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 ProductsViewModel( IProductControllerClient productControllerClient, IBasketControllerClient basketControllerClient, IDeliveryAddressControllerClient deliveryAddressControllerClient, IOrderControllerClient orderControllerClient ) { _deliveryAddressControllerClient = deliveryAddressControllerClient; _productSearch = new ProductSearchViewModel(productControllerClient, this); _productSearchResult = new ProductSearchResultViewModel(this); _productDetails = new ProductDetailsViewModel(productControllerClient, basketControllerClient, this); _basket = new BasketViewModel(basketControllerClient, this); _deliveryAddress = new DeliveryAddressViewModel(_deliveryAddressControllerClient, this); _reviewOrder = new ReviewOrderViewModel(orderControllerClient, this); _orderPlaced = new OrderPlacedViewModel(); }
public ApiClient(ICustomerControllerClient customers, IOrderControllerClient orders, IProductControllerClient products) { Customers = customers; Orders = orders; Products = products; }
public ReviewOrderViewModel(IOrderControllerClient orderControllerClient, ProductsViewModel products) { _orderControllerClient = orderControllerClient; _products = products; _placeOrderCommand = new RelayCommandAsync<object>(async x => await _placeOrder()); }
public ProductsViewModelBuilder WithOrderControllerClient(IOrderControllerClient orderControllerClient) { _orderControllerClient = orderControllerClient; return this; }