tests: add unit tests for CreateMessageRequest, DiscordMessageReference, and DiscordRestClient
refactor: update DiscordRestClient and IDiscordRestClient to use default CancellationToken refactor: rename MessageReference to DiscordMessageReference and add DiscordMessageReferenceTypes chore: update WelcomeMessageHandler to use new DiscordMessageReference
This commit is contained in:
@@ -42,4 +42,19 @@ public class LockReleaserTests
|
||||
|
||||
semaphore.CurrentCount.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Dispose_WhenCalledAndSemaphoreIsAlreadyDisposed_ItShouldNotThrowException()
|
||||
{
|
||||
var act = () =>
|
||||
{
|
||||
var semaphore = new SemaphoreSlim(0, 1);
|
||||
var lockReleaser = new LockReleaser(semaphore);
|
||||
|
||||
semaphore.Dispose();
|
||||
lockReleaser.Dispose();
|
||||
};
|
||||
|
||||
act.Should().NotThrow();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user