discord-bot/Tests/FlagTests.cs
2023-04-15 15:42:55 +05:00

21 lines
724 B
C#

using CompatBot.Database;
using NUnit.Framework;
namespace Tests;
[TestFixture]
public class FlagTests
{
[Test]
public void MultipleFlagTest()
{
var testVal = FilterAction.IssueWarning | FilterAction.MuteModQueue;
Assert.Multiple(() =>
{
Assert.That(testVal.HasFlag(FilterAction.IssueWarning), Is.True);
Assert.That(testVal.HasFlag(FilterAction.IssueWarning | FilterAction.MuteModQueue), Is.True);
Assert.That(testVal.HasFlag(FilterAction.IssueWarning | FilterAction.MuteModQueue | FilterAction.RemoveContent), Is.False);
Assert.That(testVal.HasFlag(FilterAction.IssueWarning | FilterAction.SendMessage), Is.False);
});
}
}