Remove broken tests

This commit is contained in:
Sebastien Ros
2015-09-03 15:37:27 -07:00
parent 65c3b2ab2e
commit 1c3e253edb
2 changed files with 0 additions and 39 deletions

View File

@@ -294,7 +294,6 @@
<Compile Include="Stubs\StubVirtualPathMonitor.cs" />
<Compile Include="Stubs\StubCacheManager.cs" />
<Compile Include="Stubs\StubWebSiteFolder.cs" />
<Compile Include="Tasks\LockTests.cs" />
<Compile Include="Tasks\DistributedLockServiceTests.cs" />
<Compile Include="Time\TimeZoneSelectorTests.cs" />
<Compile Include="UI\Resources\ResourceManagerTests.cs" />

View File

@@ -1,38 +0,0 @@
using Autofac;
using Moq;
using NUnit.Framework;
using Orchard.Tasks.Locking.Services;
namespace Orchard.Tests.Tasks {
[TestFixture]
public class LockTests : ContainerTestBase {
private const string LockName = "Orchard Test Lock";
private Mock<DistributedLockService> _distributedLockServiceMock;
private DistributedLock _lock;
protected override void Register(ContainerBuilder builder) {
_distributedLockServiceMock = new Mock<DistributedLockService>();
builder.RegisterInstance(_distributedLockServiceMock.Object);
}
protected override void Resolve(ILifetimeScope container) {
_lock = new DistributedLock(_distributedLockServiceMock.Object, LockName);
}
[Test]
public void DisposeInvokesDistributedLockServiceDisposeLock() {
_lock.Dispose();
_distributedLockServiceMock.Verify(service => service.ReleaseDistributedLock(_lock), Times.Exactly(1));
}
[Test]
public void DisposingMultipleTimesInvokesDistributedLockServiceDisposeLockOnce() {
_lock.Dispose();
_lock.Dispose();
_lock.Dispose();
_distributedLockServiceMock.Verify(service => service.ReleaseDistributedLock(_lock), Times.Exactly(1));
}
}
}