public void CompositeId_Equals_ReturnsTrue_WhenReferenceEqualsOther() { var id = new RemoteMembershipId { LoginProvider = "loginProvider", ProviderKey = "providerKey", }; id.Equals(id).ShouldBeTrue(); id.Equals(id as object).ShouldBeTrue(); }
public void CompositeId_Equals_ReturnsFalse_WhenOtherIsNull() { var id = new RemoteMembershipId { LoginProvider = "loginProvider", ProviderKey = "providerKey", }; id.Equals(null).ShouldBeFalse(); id.Equals(null as object).ShouldBeFalse(); }
public void CompositeId_Equals_ReturnsFalse_WhenAnyComponentIsNull(string loginProvider1, string providerKey1, string loginProvider2, string providerKey2) { var id1 = new RemoteMembershipId { LoginProvider = loginProvider1, ProviderKey = providerKey1, }; var id2 = new RemoteMembershipId { LoginProvider = loginProvider2, ProviderKey = providerKey2, }; id1.Equals(id2).ShouldBeFalse(); id1.Equals(id2 as object).ShouldBeFalse(); id2.Equals(id1).ShouldBeFalse(); id2.Equals(id1 as object).ShouldBeFalse(); }