public void TryAcquireTest3() { var softlock = new SoftLock(); softlock.TryAcquire(); softlock.TryAcquire().Should().BeFalse(); }
public void IsLockAcquired_WillReturnFalse_WhenPriorLockHasNotBeenAcquired() { var softlock = new SoftLock(); // call nothing, should be false by default softlock.IsLockAcquired.Should().BeFalse(); }
public void TryAcquireTest3() { var softLock = new SoftLock(); softLock.TryAcquire(); Assert.IsTrue(softLock.IsLockAcquired); }
public void IsLockAcquired_WillReturnTrue_WhenPriorLockHasBeenAcquired() { var softlock = new SoftLock(); // This will set the lock to true softlock.TryAcquire(); softlock.IsLockAcquired.Should().BeTrue(); }
public void TryAcquireTest1() { var softlock = new SoftLock(); // Prove that the lock is not acquired initially softlock.IsLockAcquired.Should().BeFalse(); // This will set the lock to true softlock.TryAcquire(); softlock.IsLockAcquired.Should().BeTrue(); }
public void TryAcquireTest1() { var softLock = new SoftLock(); // Prove that the lock is not acquired initially Assert.IsFalse(softLock.IsLockAcquired); // This will set the lock to true softLock.TryAcquire(); Assert.IsTrue(softLock.IsLockAcquired); }
public void ReleaseTest() { var softlock = new SoftLock(); softlock.TryAcquire(); // prove it is locked softlock.IsLockAcquired.Should().BeTrue("If this failed we have issues in TryAcquire"); softlock.Release(); // verify it has been released softlock.IsLockAcquired.Should().BeFalse(); }
public void ReleaseTest() { var softLock = new SoftLock(); softLock.TryAcquire(); // prove it is locked Assert.IsTrue(softLock.IsLockAcquired, "If this failed we have issues in TryAcquire"); softLock.Release(); // verify it has been released Assert.IsFalse(softLock.IsLockAcquired); }
public void TryAcquireTest2() { var softlock = new SoftLock(); softlock.TryAcquire().Should().BeTrue(); }
public void TryAcquireTest2() { var softLock = new SoftLock(); Assert.IsFalse(softLock.IsLockAcquired); }