Beispiel #1
0
        public void NotEqualsTest()
        {
            var chatLink = new ItemChatLink {
                ItemId = 12, Quantity = 1, SkinId = 5, Upgrade1Id = 76, Upgrade2Id = 99
            };
            var chatLink2 = new ItemChatLink {
                ItemId = 12, Quantity = 2, SkinId = 5, Upgrade1Id = 76, Upgrade2Id = 99
            };
            var chatLink3 = new ItemChatLink {
                ItemId = 12, Quantity = 1, SkinId = 7, Upgrade1Id = 76, Upgrade2Id = 99
            };
            var chatLink4 = new ItemChatLink {
                ItemId = 12, Quantity = 1, SkinId = 5, Upgrade1Id = 99, Upgrade2Id = 99
            };
            var chatLink5 = new ItemChatLink {
                ItemId = 12, Quantity = 1, SkinId = 5, Upgrade1Id = 76, Upgrade2Id = 10
            };

            Assert.False(chatLink.Equals(chatLink2));
            Assert.False(chatLink.Equals(chatLink3));
            Assert.False(chatLink.Equals(chatLink4));
            Assert.False(chatLink.Equals(chatLink5));
            Assert.False(chatLink2.Equals(chatLink3));
            Assert.False(chatLink2.Equals(chatLink4));
            Assert.False(chatLink2.Equals(chatLink5));
            Assert.False(chatLink3.Equals(chatLink4));
            Assert.False(chatLink3.Equals(chatLink5));
            Assert.False(chatLink4.Equals(chatLink5));
            Assert.False(chatLink.Equals(null));
            Assert.False(chatLink2.Equals(null));
            Assert.False(chatLink3.Equals(null));
            Assert.False(chatLink4.Equals(null));
            Assert.False(chatLink5.Equals(null));
        }
Beispiel #2
0
        public void EqualsTest()
        {
            var chatLink = new ItemChatLink {
                ItemId = 12, Quantity = 1, SkinId = 5, Upgrade1Id = 76, Upgrade2Id = 99
            };
            var chatLink2 = new ItemChatLink {
                ItemId = 12, Quantity = 1, SkinId = 5, Upgrade1Id = 76, Upgrade2Id = 99
            };

            Assert.True(chatLink.Equals((object)chatLink2));
        }