Esempio n. 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");
        }
Esempio n. 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");
        }
Esempio n. 3
0
        public void Unique_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", "y", "z" });

            CollectionAssert.AllItemsAreUnique(ca);
        }
Esempio n. 4
0
        public void ContainsNull_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new object[] { 1, 2, 3, null, 4, 5 });

            CollectionAssert.Contains(ca, null);
        }
Esempio n. 5
0
        public void Contains_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", "y", "z" });

            CollectionAssert.Contains(ca, "x");
        }
Esempio n. 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 ));
 }
Esempio n. 7
0
        public void UniqueFailure_WithTwoNulls()
        {
            CollectionAdapter ca = new CollectionAdapter(new string[] { "x", null, "y", null, "z" });

            CollectionAssert.AllItemsAreUnique(ca);
        }
Esempio n. 8
0
 public void Unique_WithNull()
 {
     CollectionAdapter ca = new CollectionAdapter( new string[] { "x", "y", null, "z" } );
     CollectionAssert.AllItemsAreUnique(ca);
 }
Esempio n. 9
0
        public void Contains_ICollection()
        {
            CollectionAdapter ca = new CollectionAdapter( new string[] { "x", "y", "z" } );

            CollectionAssert.Contains(ca,"x");
        }
Esempio n. 10
0
 public void ContainsNull_ICollection()
 {
     CollectionAdapter ca = new CollectionAdapter( new object[] { 1, 2, 3, null, 4, 5 } );
     CollectionAssert.Contains( ca, null );
 }
Esempio n. 11
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");
        }
Esempio n. 12
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");
        }