tests: add tests

This commit is contained in:
Stevan Freeborn
2025-05-09 18:28:40 -05:00
parent 4bfe705fb6
commit c16e8754db
12 changed files with 133 additions and 26 deletions
@@ -0,0 +1,37 @@
namespace StevesBot.Worker.Tests.Unit;
public class DiscordIntentsTests
{
[Theory]
[MemberData(nameof(TestData))]
public void Intents_ShouldHaveCorrectValue(long intent, long expectedValue)
{
intent.Should().Be(expectedValue);
}
public static TheoryData<long, long> TestData => new()
{
{ DiscordIntents.Guilds, 1 },
{ DiscordIntents.GuildMembers, 2 },
{ DiscordIntents.GuildModeration, 4 },
{ DiscordIntents.GuildExpressions, 8 },
{ DiscordIntents.GuildIntegrations, 16 },
{ DiscordIntents.GuildWebhooks, 32 },
{ DiscordIntents.GuildInvites, 64 },
{ DiscordIntents.GuildVoiceStates, 128 },
{ DiscordIntents.GuildPresences, 256 },
{ DiscordIntents.GuildMessages, 512 },
{ DiscordIntents.GuildMessageReactions, 1024 },
{ DiscordIntents.GuildMessageTyping, 2048 },
{ DiscordIntents.DirectMessages, 4096 },
{ DiscordIntents.DirectMessageReactions, 8192 },
{ DiscordIntents.DirectMessageTyping, 16384 },
{ DiscordIntents.MessageContent, 32768 },
{ DiscordIntents.GuildScheduledEvents, 65536 },
{ DiscordIntents.AutoModerationConfiguration, 1048576 },
{ DiscordIntents.AutoModerationExecution, 2097152 },
{ DiscordIntents.GuildMessagePolls, 16777216 },
{ DiscordIntents.DirectMessagePolls, 33554432 },
{ DiscordIntents.All, 53608447 }
};
}