public BasketViewModel(IBasketControllerClient basketControllerClient, ProductsViewModel products)
 {
     _basketControllerClient = basketControllerClient;
     _products = products;
     _updateProductQuantityCommand = new RelayCommandAsync<int>(async x => await _updateProductQuantity(x));
     _proceedToCheckoutCommand = new RelayCommandAsync<object>(async x => await _proceedToCheckout());
 }
 public ProductDetailsViewModel(
     IProductControllerClient productControllerClient, 
     IBasketControllerClient basketControllerClient,
     ProductsViewModel productsViewModel
     )
 {
     _productControllerClient = productControllerClient;
     _basketControllerClient = basketControllerClient;
     _productsViewModel = productsViewModel;
     _addToBasketCommand = new RelayCommandAsync<int>(async x => await _addProductToBasket(x));
 }
        public virtual void Context()
        {
            ProductControllerClient = Stub<IProductControllerClient>();
            BasketControllerClient = Mock<IBasketControllerClient>();
            DeliveryAddressControllerClient = Mock<IDeliveryAddressControllerClient>();
            OrderControllerClient = Mock<IOrderControllerClient>();

            ViewModel = new ProductsViewModelBuilder()
                .WithProductControllerClient(ProductControllerClient)
                .WithBasketControllerClient(BasketControllerClient)
                .WithDeliveryAddressControllerClient(DeliveryAddressControllerClient)
                .WithOrderControllerClient(OrderControllerClient)
                .Build();
        }
        public void Context()
        {
            _productsViewModel = new ProductsViewModelBuilder().Build();

            _viewModel = new MainViewModel(_productsViewModel);
        }
 public DeliveryAddressViewModel(IDeliveryAddressControllerClient deliveryAddressControllerClient, ProductsViewModel products)
 {
     _products = products;
     _deliveryAddressControllerClient = deliveryAddressControllerClient;
     _setDeliveryAddressCommand = new RelayCommandAsync<string>(async x => await _setDeliveryAddress(x), _canSetDeliveryAddressExecute);
 }
 public ProductSearchViewModel(IProductControllerClient productControllerClient, ProductsViewModel products)
 {
     _productControllerClient = productControllerClient;
     _products = products;
     _searchProductsCommand = new RelayCommandAsync<string>(async x => await _searchProducts(x));
 }
 public ReviewOrderViewModel(IOrderControllerClient orderControllerClient, ProductsViewModel products)
 {
     _orderControllerClient = orderControllerClient;
     _products = products;
     _placeOrderCommand = new RelayCommandAsync<object>(async x => await _placeOrder());
 }
 public MainViewModel(
     ProductsViewModel productsViewModel
     )
 {
     CurrentViewModel = productsViewModel;
 }
 public ProductSearchResultViewModel(ProductsViewModel productsViewModel)
 {
     _productsViewModel = productsViewModel;
     _selectProductCommand = new RelayCommandAsync<int>(async x => await _selectProduct(x));
 }