private Customer CreateSomeCustomer() { var fullName = new FullName(JohnSmith.FirstName, JohnSmith.LastName); var nationalCode = new NationalCode(JohnSmith.NationalCode); return(new Customer(fullName, nationalCode, Clock)); }
private Customer MapToCustomer(RegisterCustomerCommand command) { var fullName = new FullName(command.FirstName, command.LastName); var nationalCode = new NationalCode(command.NationalCode); return(new Customer(fullName, nationalCode, _clock)); }
/// <inheritdoc /> public Customer(FullName fullName, NationalCode nationalCode, IClock clock) { Id = Guid.NewGuid(); FullName = fullName; NationalCode = nationalCode; IsActive = true; CreatedAt = clock.Now(); }
/// <inheritdoc /> public Customer(FullName fullName, NationalCode nationalCode, IClock clock) { this.Id = Guid.NewGuid(); this.FullName = fullName; this.NationalCode = nationalCode; this.IsActive = true; this.CreatedAt = clock.Now(); }
public void Should_be_able_to_register_new_customer() { Clock.Adjust(new DateTime(2020, 01, 01)); var fullName = new FullName(JohnSmith.FirstName, JohnSmith.LastName); var nationalCode = new NationalCode(JohnSmith.NationalCode); var customer = new Customer(fullName, nationalCode, Clock); customer.Id.Should().NotBeEmpty(); customer.FullName.Should().Be(fullName); customer.NationalCode.Should().Be(nationalCode); customer.CreatedAt.Should().Be(Clock.Now()); }
internal Employee(Guid id, FullName fullName, NationalCode nationalCode) : base(id) { this.FullName = fullName; this.NationalCode = nationalCode; }
/// <inheritdoc /> public Employee(FullName fullName, NationalCode nationalCode) : base(Guid.NewGuid()) { this.FullName = fullName; this.NationalCode = nationalCode; }
public WhatsappNumber(NationalCode country_code, string Number) : this(Number) { nationalCode = country_code; }