예제 #1
0
        public void AreEquivalentHandlesNull()
        {
            ICollection set1 = new ICollectionAdapter(null, "x", null, "z");
            ICollection set2 = new ICollectionAdapter("z", null, "x", null);

            Ensure.AreEquivalent(set1, set2);
        }
예제 #2
0
        public void Equivalent()
        {
            ICollection set1 = new ICollectionAdapter("x", "y", "z");
            ICollection set2 = new ICollectionAdapter("z", "y", "x");

            Ensure.AreEquivalent(set1, set2);
        }
예제 #3
0
        public void ContainsFails_EmptyICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter(new object[0]);

            expectedMessage =
                "  Expected: collection containing \"x\"" + Environment.NewLine +
                "  But was:  <empty>" + Environment.NewLine;
            Ensure.Contains("x", ca);
        }
예제 #4
0
        public void ContainsFails_ICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter(new string[] { "x", "y", "z" });

            expectedMessage =
                "  Expected: collection containing \"a\"" + Environment.NewLine +
                "  But was:  < \"x\", \"y\", \"z\" >" + Environment.NewLine;
            Ensure.Contains("a", ca);
        }
예제 #5
0
        public void EquivalentFailTwo()
        {
            ICollection set1 = new ICollectionAdapter("x", "y", "x");
            ICollection set2 = new ICollectionAdapter("x", "y", "z");

            expectedMessage =
                "  Expected: equivalent to < \"x\", \"y\", \"x\" >" + Environment.NewLine +
                "  But was:  < \"x\", \"y\", \"z\" >" + Environment.NewLine;
            Ensure.AreEquivalent(set1, set2);
        }
예제 #6
0
        public void ContainsNull_ICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter(new object[] { 1, 2, 3, null, 4, 5 });

            Ensure.Contains(null, ca);
        }
예제 #7
0
        public void Contains_ICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter(new string[] { "x", "y", "z" });

            Ensure.Contains("x", ca);
        }
예제 #8
0
        public void ContainsFails_EmptyICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter( new object[0] );

            expectedMessage =
                "  Expected: collection containing \"x\"" + Environment.NewLine +
                "  But was:  <empty>" + Environment.NewLine;
            Ensure.Contains( "x", ca );
        }
예제 #9
0
 public void ContainsNull_ICollection()
 {
     ICollectionAdapter ca = new ICollectionAdapter( new object[] {1, 2, 3, null, 4, 5} );
     Ensure.Contains( null, ca );
 }
예제 #10
0
        public void ContainsFails_ICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter( new string[] {"x", "y", "z"} );

            expectedMessage =
                "  Expected: collection containing \"a\"" + Environment.NewLine +
                "  But was:  < \"x\", \"y\", \"z\" >" + Environment.NewLine;
            Ensure.Contains( "a", ca );
        }
예제 #11
0
        public void Contains_ICollection()
        {
            ICollectionAdapter ca = new ICollectionAdapter( new string[] {"x", "y", "z"} );

            Ensure.Contains( "x", ca );
        }
예제 #12
0
        public void AreEquivalentHandlesNull()
        {
            ICollection set1 = new ICollectionAdapter( null, "x", null, "z" );
            ICollection set2 = new ICollectionAdapter( "z", null, "x", null );

            Ensure.AreEquivalent( set1, set2 );
        }
예제 #13
0
        public void EquivalentFailTwo()
        {
            ICollection set1 = new ICollectionAdapter( "x", "y", "x" );
            ICollection set2 = new ICollectionAdapter( "x", "y", "z" );

            expectedMessage =
                "  Expected: equivalent to < \"x\", \"y\", \"x\" >" + Environment.NewLine +
                "  But was:  < \"x\", \"y\", \"z\" >" + Environment.NewLine;
            Ensure.AreEquivalent( set1, set2 );
        }
예제 #14
0
        public void Equivalent()
        {
            ICollection set1 = new ICollectionAdapter( "x", "y", "z" );
            ICollection set2 = new ICollectionAdapter( "z", "y", "x" );

            Ensure.AreEquivalent( set1, set2 );
        }