public void DictionaryNotEqualsWithArraysTest() { // setup string nameA = "Timmy"; var itemsA = new Dictionary <string, object> { { "a", "apple" }, { "b", new int[] { 907 } } }; string nameB = "Timmy"; var itemsB = new Dictionary <string, object> { { "a", "apple" }, { "b", new int[] { 909 } } }; var dictionaryContainerA = new ObjectDictionaryContainer { Name = nameA, Items = itemsA }; var dictionaryContainerB = new ObjectDictionaryContainer { Name = nameB, Items = itemsB }; // test var equal = dictionaryContainerA.Equals(dictionaryContainerB); // assert Assert.IsFalse(equal); }
public void DictionaryEqualsWithDeferencingTest() { // setup string nameA = "Timmy"; var itemsA = new Dictionary <string, object> { { "a", "apple" }, { "b", 32 } }; string nameB = "Timmy"; var itemsB = new Dictionary <string, object> { { "a", "apple" }, { "b", 32 } }; var dictionaryContainerA = new ObjectDictionaryContainer { Name = nameA, Items = itemsA }; var dictionaryContainerB = new ObjectDictionaryContainer { Name = nameB, Items = itemsB }; // test var equal = dictionaryContainerA.Equals(dictionaryContainerB); // assert Assert.IsTrue(equal); }