Esempio n. 1
0
        public void SetNotEqualsTest()
        {
            // setup
            string nameA  = "Timmy";
            var    itemsA = new HashSet <string>
            {
                "appleA",
                "bananaA"
            };

            string nameB  = "Timmy";
            var    itemsB = new HashSet <string>
            {
                "appleB",
                "bananaB"
            };

            var setContainerA = new SetContainer
            {
                Name  = nameA,
                Items = itemsA
            };

            var setContainerB = new SetContainer
            {
                Name  = nameB,
                Items = itemsB
            };

            // test
            var equal = setContainerA.Equals(setContainerB);

            // assert
            Assert.IsFalse(equal);
        }
        public void ObjectAppenderSetEqualsTest()
        {
            // setup
            string nameA  = "Timmy";
            var    itemsA = new HashSet <string>
            {
                "apple",
                "banana"
            };

            string nameB  = "Timmy";
            var    itemsB = new HashSet <string>
            {
                "apple",
                "banana"
            };

            var setContainerA = new SetContainer
            {
                Name  = nameA,
                Items = itemsA
            };

            var setContainerB = new SetContainer
            {
                Name  = nameB,
                Items = itemsB
            };

            // test
            var equal = setContainerA.Equals(setContainerB);

            // assert
            Assert.IsTrue(equal);
        }