コード例 #1
0
        public void ContainsFails_EmptyICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new object[0]);

            expectedMessage =
                "  Expected: collection containing \"x\"" + Environment.NewLine +
                "  But was:  <empty>" + Environment.NewLine;
            CollectionAssert.Contains(ca, "x");
        }
コード例 #2
0
        public void ContainsFails_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", "y", "z" });

            expectedMessage =
                "  Expected: collection containing \"a\"" + Environment.NewLine +
                "  But was:  < \"x\", \"y\", \"z\" >" + Environment.NewLine;
            CollectionAssert.Contains(ca, "a");
        }
コード例 #3
0
        public void Unique_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", "y", "z" });

            CollectionAssert.AllItemsAreUnique(ca);
        }
コード例 #4
0
        public void ContainsNull_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new object[] { 1, 2, 3, null, 4, 5 });

            CollectionAssert.Contains(ca, null);
        }
コード例 #5
0
        public void Contains_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", "y", "z" });

            CollectionAssert.Contains(ca, "x");
        }
コード例 #6
0
 public void CanTestContentsOfCollectionNotImplementingIList()
 {
     CollectionAdapter ints = new CollectionAdapter(new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9});
     Assert.That(ints, new CollectionContainsConstraint( 9 ));
 }
コード例 #7
0
        public void UniqueFailure_WithTwoNulls()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", null, "y", null, "z" });

            CollectionAssert.AllItemsAreUnique(ca);
        }
コード例 #8
0
ファイル: CollectionAssertTest.cs プロジェクト: fotisp/conqat
 public void Unique_WithNull()
 {
     CollectionAdapter ca = new CollectionAdapter( new string[] { "x", "y", null, "z" } );
     CollectionAssert.AllItemsAreUnique(ca);
 }
コード例 #9
0
ファイル: CollectionAssertTest.cs プロジェクト: fotisp/conqat
        public void Contains_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter( new string[] { "x", "y", "z" } );

            CollectionAssert.Contains(ca,"x");
        }
コード例 #10
0
ファイル: CollectionAssertTest.cs プロジェクト: fotisp/conqat
 public void ContainsNull_ICollection()
 {
     CollectionAdapter ca = new CollectionAdapter( new object[] { 1, 2, 3, null, 4, 5 } );
     CollectionAssert.Contains( ca, null );
 }
コード例 #11
0
ファイル: CollectionAssertTest.cs プロジェクト: fotisp/conqat
        public void ContainsFails_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter( new string[] { "x", "y", "z" } );

            expectedMessage =
                "  Expected: collection containing \"a\"" + Environment.NewLine +
                "  But was:  < \"x\", \"y\", \"z\" >" + Environment.NewLine;
            CollectionAssert.Contains(ca,"a");
        }
コード例 #12
0
ファイル: CollectionAssertTest.cs プロジェクト: fotisp/conqat
        public void ContainsFails_EmptyICollection()
        {
            CollectionAdapter ca = new CollectionAdapter( new object[0] );

            expectedMessage =
                "  Expected: collection containing \"x\"" + Environment.NewLine +
                "  But was:  <empty>" + Environment.NewLine;
            CollectionAssert.Contains(ca,"x");
        }