示例#1
0
        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");
        }
示例#2
0
        public void TestHasFlagWithEnumExpectException()
        {
            ExX x = ExX.A | ExX.D;

            x.HasFlag(X.B);
        }