public void Step1_CanCreateAccount() { Account account = AccountBuilder.DefaultAccount() .Build(); Assert.IsNotNull(account); }
public void Step3_EasyToCreateLateAccount() { var account = AccountBuilder.DefaultAccount() .WithLatePaymentStatus() .Build(); Assert.IsTrue(account.DueDate < DateTime.Now); }
public void Step4_CanCreateLateAccountWithVipCustomer() { var account = AccountBuilder.DefaultAccount() .WithLatePaymentStatus() .WithVipCustomer() .Build(); Assert.IsTrue(account.Customer.IsVip); }
public void Step5_CanCustomizeAddress() { var account = AccountBuilder.DefaultAccount() .WithLatePaymentStatus() .WithVipCustomer() .WithAddress().InLondon().Build() .Build(); Assert.IsTrue(account.Customer.Address.City == "London"); Assert.IsTrue(account.Customer.Address.Country == "UK"); }
public void Step2_AssignsDefaultValues() { var account = AccountBuilder.DefaultAccount().Build(); Assert.IsTrue(account.Balance > 0); Assert.IsTrue(account.DueDate > DateTime.Now); Assert.IsNotNull(account.Customer.Address.City); Assert.IsNotNull(account.Customer.Address.Country); Assert.IsFalse(account.Customer.IsVip); Assert.IsNotNull(account.Customer.Name); }
public AddressBuilder(AccountBuilder builder) { _builder = builder; }
public AddressBuilder(AccountBuilder accountBuilder) { _accountBuilder = accountBuilder; }