Skip to content

Commit

Permalink
Fixed broken test.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Jan 14, 2024
1 parent 7d180ae commit 9c9f09d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ public void TestMaxCount()
{
using var asyncNonKeyedLocker = new AsyncNonKeyedLocker(2);
Assert.Equal(0, asyncNonKeyedLocker.GetRemainingCount());
Assert.Equal(2, asyncNonKeyedLocker.GetCurrentCount());
Assert.Equal(asyncNonKeyedLocker.MaxCount, asyncNonKeyedLocker.GetCurrentCount());
using (var myLock = (AsyncNonKeyedLockReleaser)asyncNonKeyedLocker.Lock())
{
Assert.Equal(1, asyncNonKeyedLocker.GetRemainingCount());
Assert.Equal(1, asyncNonKeyedLocker.GetCurrentCount());
Assert.Equal(1, myLock.SemaphoreSlim.CurrentCount);
using (var myLock2 = (AsyncNonKeyedLockReleaser)asyncNonKeyedLocker.Lock())
{
Assert.Equal(2, asyncNonKeyedLocker.GetRemainingCount());
Assert.Equal(asyncNonKeyedLocker.MaxCount, asyncNonKeyedLocker.GetRemainingCount());
Assert.Equal(0, asyncNonKeyedLocker.GetCurrentCount());
Assert.Equal(0, myLock2.SemaphoreSlim.CurrentCount);
}
}
Assert.Equal(0, asyncNonKeyedLocker.GetRemainingCount());
Assert.Equal(1, asyncNonKeyedLocker.GetCurrentCount());
Assert.Equal(asyncNonKeyedLocker.MaxCount, asyncNonKeyedLocker.GetCurrentCount());
}

[Fact]
Expand Down

0 comments on commit 9c9f09d

Please sign in to comment.