Пример #1
0
        public void PaymentCommand_SalesControllerStart_StartPaymentCalled()
        {
            _fakeSalesController.MissingPaymentOnOrder().Returns(100);
            _uut.ViewProducts.Add(new SalesViewModel.ViewProduct("2", "Beer", "10"));
            var payment = _uut.PaytypeCommand;

            payment.Execute(PaymentType.Cash);
            _fakeSalesController.Received(1).StartPayment(100, Arg.Any <string>(), Arg.Any <PaymentType>());
        }
Пример #2
0
        public void AddProduct_ICommand_CallsSalesCtrl()
        {
            var Command = _uut.AddProduct;

            Command.Execute(new Product("YellowAle", 20, true));
            _fakeSalesController.Received(1).AddProductToOrder(Arg.Any <Product>(), Arg.Any <int>(), Arg.Any <Discount>());
        }