public void CustomersAreEqual() { var guid = Guid.NewGuid(); var id1 = new CustomerId(guid); var id2 = new CustomerId(guid); var customer1 = new Customer(id1); var customer2 = new Customer(id2); Assert.That(customer1, Is.EqualTo(customer2)); }
public bool Equals(Customer other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other._id, _id); }