private EmailTestBuilder(Email.EmailBuilder emailBuilder) { _emailBuilder = emailBuilder; }
public OrderData() { AddressBuilder addressBuilder = new AddressBuilder() .WithCountry("Belgium") .WithHouseNumber("16A") .WithPostalCode("3000") .WithStreetName("Jantjesstraat"); Email.EmailBuilder emailBuilder = new Email.EmailBuilder() .WithLocalPart("niels") .WithDomain("mymail.be") .WithComplete("*****@*****.**"); PhoneNumber.PhoneNumberBuilder phoneNumberBuilder = new PhoneNumber.PhoneNumberBuilder() .WithNumber("484554433") .WithCountryCallingCode("+32"); Customer.CustomerBuilder custBuild = new Customer.CustomerBuilder() .WithId(Guid.NewGuid()) .WithFirstname("Tom") .WithLastname("Thompson") .WithAddress(addressBuilder.Build()) .WithEmail(emailBuilder.Build()) .WithPhoneNumber(phoneNumberBuilder.Build()); Customer1 = new Customer(custBuild); Item.ItemBuilder item1 = new Item.ItemBuilder() .WithId(Guid.NewGuid()) .WithAmountOfStock(50) .WithDescription("Just a simple headphone") .WithName("Headphone") .WithPrice(Price.Create(new decimal(49.95))); Item.ItemBuilder item2 = new Item.ItemBuilder() .WithId(Guid.NewGuid()) .WithAmountOfStock(50) .WithDescription("Just a simple micro") .WithName("Micro") .WithPrice(Price.Create(new decimal(22.95))); Order1 = new Order(new Order.OrderBuilder() .WithId(Guid.NewGuid())); OrderItem.OrderItemBuilder orderItem1 = new OrderItem.OrderItemBuilder() .WithOrderId(Order1.Id) .WithItemId(item1.Id) .WithItemPrice(item1.Price) .WithOrderedAmount(5); OrderItem.OrderItemBuilder orderItem2 = new OrderItem.OrderItemBuilder() .WithOrderId(Order1.Id) .WithItemId(item2.Id) .WithItemPrice(item2.Price) .WithOrderedAmount(5); Order1 = new Order(new Order.OrderBuilder() .WithId(Guid.NewGuid()) .WithCustomerId(Customer1.Id) .WithOrderItems(new List <OrderItem> { orderItem1.Build(), orderItem2.Build() }) ); ItemList = new List <Item>() { item1.Build(), item2.Build() }; }