Ejemplo n.º 1
0
 public User BuildWithDefaults()
 {
     AddressBuilder addressBuilder = new AddressBuilder();
     List<Address> defaultAddresses = new List<Address>();
     defaultAddresses.Add(addressBuilder.BuildWithDefaults());
     PhoneBuilder phoneBuilder = new PhoneBuilder();
     List<Phone> defaultPhones = new List<Phone>();
     defaultPhones.Add(phoneBuilder.BuildWithDefaults());
     EmailBuilder emailBuilder = new EmailBuilder();
     List<Email> defaultEmails = new List<Email>();
     defaultEmails.Add(emailBuilder.BuildWithDefaults());
     return WithUserName("DefaultUser")
         .WithFirstName("Default")
         .WithLastName("User")
         .WithAddresses(defaultAddresses)
         .WithPhones(defaultPhones)
         .WithEmails(defaultEmails)
         .Build();
 }