public void TestHasFlagWithEnum() { ExX x = ExX.A | ExX.D; Assert.IsTrue(x.HasFlag(ExX.A), "Expected: true, because A is set in x"); Assert.IsFalse(x.HasFlag(ExX.B), "Expected: false, because B is not set in x"); Assert.IsTrue(x.HasFlag(ExX.D), "Expected: true, because D is set in x"); }
public void TestHasFlagWithEnumExpectException() { ExX x = ExX.A | ExX.D; x.HasFlag(X.B); }