Пример #1
0
 public Order(Customer customer, Salesman salesman, Address deliveryAddress, DateTime orderedOn)
 {
     Customer = customer;
     Salesman = salesman;
     DeliveryAddress = deliveryAddress;
     OrderedOn = orderedOn;
 }
        public void FormatThePhoneNumber()
        {
            Customer customer = new Customer("Alberto", "Paez", new PhoneNumber("54115678654"));

            string formattedPhone = customer.FormatPhone();

            Assert.AreEqual("CountryCode:54 - Citycode:11 - LocalNumber:5678654", formattedPhone);
        }
 private Order CreateOrder(string deliveryCountry)
 {
     var customer = new Customer("Luis", "Palacios", new PhoneNumber("54115678654"));
     var salesman = new Salesman("Alberto", "Martinez", 4000, 4);
     return new Order(customer, salesman, new Address("Los claveles 452", "New York", deliveryCountry), DateTime.Now);
 }