public void TestEqualWithSelfAndWithNull() { var item = new User { UserName = "******", Password = "******" }; var item2 = new User {UserName = "******", Password = "******"}; Assert.True(item.Equals(item)); Assert.False(item.Equals(null)); Assert.True(item.Equals(item2)); }
public void TestEqualWithObject() { var item = new User { UserName = "******", Password = "******" }; var item2 = new User { UserName = "******", Password = "******" }; var itemGroup = new ItemGroup(); Assert.False(item.Equals((object)null)); Assert.True(item.Equals((object)item)); Assert.False(item.Equals((object)itemGroup)); Assert.True(item.Equals(item2)); }