예제 #1
0
        public static Assert Empty <T>(this AssertValues <T> value)
        {
            if (value.Inverse)
            {
                Assert.IsFalse(value.Values.Count() == 0);
            }
            else
            {
                Assert.IsTrue(value.Values.Count() == 0);
            }

            return(Assert.That);
        }
예제 #2
0
        public static Assert True(this AssertValues <bool> values)
        {
            if (values.Inverse)
            {
                foreach (var value in values.Values)
                {
                    Assert.IsFalse(value);
                }
            }
            else
            {
                foreach (var value in values.Values)
                {
                    Assert.IsTrue(value);
                }
            }

            return(Assert.That);
        }
예제 #3
0
        public static Assert EqualTo <T>(this AssertValues <T> values, T expected)
        {
            if (values.Inverse)
            {
                foreach (var value in values.Values)
                {
                    Assert.AreNotEqual(expected, value);
                }
            }
            else
            {
                foreach (var value in values.Values)
                {
                    Assert.AreEqual(expected, value);
                }
            }

            return(Assert.That);
        }