Esempio n. 1
0
 public void SetUp()
 {
     logger = Substitute.For<Logger>();
     shoppingConsole = Substitute.For<ShoppingConsole>();
     shoppingCartViewModel = new ShoppingCartViewModel(logger);
     shoppingCart = new ShoppingCart(shoppingCartViewModel, shoppingConsole);
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var viewModel = new ShoppingCartViewModel(new Logger());
            var shoppingCart = new ShoppingCart(viewModel, new ShoppingConsole());

            viewModel.AddProduct(new Product("SmartPhone"));
            viewModel.AddProduct(new Product("Computer"));
            viewModel.AddProduct(new Product("HeadPhones"));
            viewModel.AddProduct(new Product("Keyboard"));
            viewModel.AddProduct(new Product("Screen"));
        }