public void SingleValuedExample() { ClientRef clientRef1 = ClientRef.From("ASDF12345"); ClientRef clientRef2 = ClientRef.From("ASDF12345"); Assert.AreEqual(clientRef1, clientRef2); Assert.AreEqual(clientRef1.GetHashCode(), clientRef2.GetHashCode()); ClientRef clientRef3 = ClientRef.From("QWER98765"); Assert.AreNotEqual(clientRef1, clientRef3); Assert.AreNotEqual(clientRef1.GetHashCode(), clientRef3.GetHashCode()); }
public void ToStringReturnsValueToStringForSingleValuedObjects() { ClientRef clientRef1 = ClientRef.From("ASDF12345"); Assert.AreEqual(clientRef1.Value, clientRef1.ToString()); }