Пример #1
0
        public void Dictionary_members_are_used_correctly_for_equality_comparison()
        {
            var x = new DictionaryType(new Dictionary <string, string> {
                { "a", "The A" }, { "b", "The B" }
            });
            var y = new DictionaryType(new Dictionary <string, string> {
                { "a", "The A" }, { "b", "The B" }
            });

            Assert.True(x.Equals(y));
            Assert.True(y.Equals(x));
            Assert.True(x == y);
            Assert.False(x != y);

            Assert.Equal(x.GetHashCode(), y.GetHashCode());
        }