tests: begin the march to test coverage

This commit is contained in:
Stevan Freeborn
2025-05-19 22:57:32 -05:00
parent bb1fadeac0
commit 06425f4c05
7 changed files with 89 additions and 247 deletions
@@ -0,0 +1,20 @@
namespace StevesBot.Worker.Tests.Unit;
public class DiscordCloseCodesTests
{
[Theory]
[InlineData(4004, false)]
[InlineData(4010, false)]
[InlineData(4011, false)]
[InlineData(4012, false)]
[InlineData(4013, false)]
[InlineData(4014, false)]
[InlineData(null, true)]
[InlineData(1000, true)]
public void IsReconnectable_WhenCalledWithCloseCode_ItShouldReturnExpectedResult(int? closeCode, bool expected)
{
var result = DiscordCloseCodes.IsReconnectable(closeCode);
result.Should().Be(expected);
}
}