Inheritance: ThirdParty
コード例 #1
0
        public void FormatThePhoneNumber()
        {
            Customer customer = new Customer("Alberto", "Paez", "54115678654");

            string formattedPhone = customer.FormatPhone();

            Assert.AreEqual("CountryCode:54 - Citycode:11 - LocalNumber:5678654", formattedPhone);
        }
コード例 #2
0
ファイル: Order.cs プロジェクト: snahider/Refactoring-Golf
 public Order(Customer customer, Salesman salesman, string deliveryStreet, string deliveryCity, string deliveryCountry, DateTime orderedOn)
 {
     Customer = customer;
     Salesman = salesman;
     DeliveryStreet = deliveryStreet;
     DeliveryCity = deliveryCity;
     DeliveryCountry = deliveryCountry;
     OrderedOn = orderedOn;
     Items = new List<OrderItem>();
 }
コード例 #3
0
 private Order CreateOrder(string deliveryCountry)
 {
     var customer = new Customer("Luis", "Palacios", "54115678654");
     var salesman = new Salesman("Alberto", "Martinez", 4000, 4);
     return new Order(customer, salesman, "Los claveles 452", "New York", deliveryCountry, DateTime.Now);
 }