public virtual bool Equals(DateOfBirth other) { if (null != other && other.GetType() == GetType()) { return other.Date == Date; } return false; }
public void Correcting_a_date_of_birth_raises_a_ClientDateOfBirthCorrected_event() { var client = CreateGenericClient(); var dateOfBirth = new DateOfBirth(new DateTime(1920, 01, 01)); client.CorrectDateOfBirth(dateOfBirth); client.GetRaisedEvents().Count().ShouldBe(1); client.GetRaisedEvents().First().ShouldBeTypeOf<ClientDateOfBirthCorrected>(); }