コード例 #1
0
        public void IsNotEmptyTest4()
        {
            EmptyTestEnumerable c = new EmptyTestEnumerable();

            Assert.Throws <ArgumentException>(() =>
            {
                Condition.Requires(c).IsNotEmpty();
            });
        }
コード例 #2
0
        public void IsNotEmptyTest8()
        {
            EmptyTestEnumerable c = new EmptyTestEnumerable();

            try
            {
                Condition.Requires(c, "c").IsNotEmpty("{0} should have no elements what so ever");
            }
            catch (ArgumentException ex)
            {
                ex.Message.ShouldContain("c should have no elements what so ever");
            }
        }
コード例 #3
0
        public void IsEmptyTest07()
        {
            EmptyTestEnumerable c = new EmptyTestEnumerable();

            Condition.Requires(c).IsEmpty("condition should hold");
        }
コード例 #4
0
        public void IsEmptyTest04()
        {
            EmptyTestEnumerable c = new EmptyTestEnumerable();

            Condition.Requires(c).IsEmpty();
        }