Пример #1
0
 public void AssertPatched_EquivalentNotStrictNestedArrays_Passes()
 {
     AssertPatched.Equal(
         new[] { new string[] { "Foo" }, new string[] { "Bar" } },
         new[] { new object[] { "Foo" }, new object[] { "Bar" } },
         false);
 }
Пример #2
0
 public void AssertPatched_EquivalentStrictNestedArrays_ThrowsEqualException()
 {
     Assert.Throws <EqualException>(
         delegate()
     {
         AssertPatched.Equal(
             new[] { new string[] { "Foo" }, new string[] { "Bar" } },
             new[] { new object[] { "Foo" }, new object[] { "Bar" } },
             true);
     });
 }
Пример #3
0
        public void AssertPatched_EquivalentNotStrictDictionaries_Passes()
        {
            var x = new Dictionary <string, object>
            {
                { "Key", "Value" }
            };

            dynamic y = new System.Dynamic.ExpandoObject();

            y.Key = "Value";

            AssertPatched.Equal <IDictionary <string, object> >(x, y, false);
        }
Пример #4
0
        public void AssertPatched_EquivalentStrictDictionaries_ThrowsEqualException()
        {
            var x = new Dictionary <string, object>
            {
                { "Key", "Value" }
            };

            dynamic y = new System.Dynamic.ExpandoObject();

            y.Key = "Value";

            Assert.Throws <EqualException>(
                delegate()
            {
                AssertPatched.Equal <IDictionary <string, object> >(x, y, true);
            });
        }
Пример #5
0
 public void AssertPatched_ExactlyEqualNestedArrays_Passes()
 {
     AssertPatched.Equal(
         new[] { new[] { "Foo" }, new[] { "Bar" } },
         new[] { new[] { "Foo" }, new[] { "Bar" } });
 }