コード例 #1
0
        public BasketService()
        {
            var butter = new Product()
            {
                Name = "Butter", Type = ProductType.Butter, Price = 0.80
            };
            var milk = new Product()
            {
                Name = "Milk", Type = ProductType.Milk, Price = 1.15
            };
            var bread = new Product()
            {
                Name = "Bread", Type = ProductType.Bread, Price = 1.00
            };

            productBasket = ProductBasket.Build();

            AddProduct(butter);
            AddProduct(milk);
            AddProduct(bread);
        }
コード例 #2
0
 public BasketService()
 {
     ProductBasket = ProductBasket.Build();
     Total         = 0.00;
 }