discord-bot/Tests/FlagTests.cs
13xforever 92751ba6e9 use file-scoped namespaces to reduce nesting
some formatting might be fucked
2022-06-30 00:59:46 +05:00

18 lines
656 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.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);
}
}