public UserDashboardModel(IOrderQuery orderQuery, IAuthHelper authHelper, IOrderApplication orderApplication, IAccountApplication accountApplication) { _orderQuery = orderQuery; _authHelper = authHelper; _orderApplication = orderApplication; _accountApplication = accountApplication; }
public void Setup() { var mock = Substitute.For <IOrderRepository>(); var orders = new List <Order> { new Order { Id = 1, ClientId = 1, Status = OrderStatusEnum.Pending } }; mock.List(1) .Returns(orders); mock.Get(1) .Returns(orders.FirstOrDefault()); mock.List(0) .Returns(new List <Order>()); mock.UpdateStatus(new Order { Id = 1, Status = OrderStatusEnum.Pending }) .Returns(1); _orderApp = new OrderApplication(mock); }
public CheckoutModel(IUserQuery userQuery, ICartService cartService, IProductQuery productQuery, ICalculateCart calculateCart, IZarinPalFactory zarinPalFactory, IOrderApplication orderApplication) { _userQuery = userQuery; _cartService = cartService; _productQuery = productQuery; _calculateCart = calculateCart; _zarinPalFactory = zarinPalFactory; _orderApplication = orderApplication; }
public CheckoutModel(ICartCalculatorService calculatorService, ICartService cartService, IProductQuery productQuery, IOrderApplication orderApplication, IZarinPalFactory zarinPalFactory, IAuthHelper authHelper) { _cartCalculatorService = calculatorService; _cartService = cartService; _productQuery = productQuery; _orderApplication = orderApplication; _zarinPalFactory = zarinPalFactory; _authHelper = authHelper; Cart = new Cart(); }
private static void CreateOrder(IOrderApplication application, Guid custumerId) { var order = new OrderModel() { CustumerId = custumerId, Date = DateTime.Now, Details = new OrderDetailModel[] { new() { ProductId = Guid.Parse("0353853f-6b34-4b2c-9c98-e51e61ec45d4"), Quantity = 10 }, } }; var result = application.Create(order).Result; Assert.IsTrue(result.IsValid); }
public OrderService(ILogger <ProductService> logger, IOrderApplication orderApplication) { _logger = logger; _orderApplication = orderApplication; }
public IndexModel(IOrderApplication orderApplication, IAccountApplication accountApplication) { _orderApplication = orderApplication; _accountApplication = accountApplication; }
public OrderController(IOrderApplication appOrder, ILightPoleApplication appLightPole) { _appOrder = appOrder; _appLightPole = appLightPole; }
public IndexModel(IUserApplication userApplication, IOrderApplication orderApplication) { _userApplication = userApplication; _orderApplication = orderApplication; }
private ManagerDataSource() { OrderManager = IOC.Instance.Resolve <IOrderApplication>(); }
public OrderItemsModel(IOrderApplication orderApplication) { _orderApplication = orderApplication; }
public OrderController(IOrderApplication orderApplication) { _orderApplication = orderApplication; }
public OrderController(IOrderApplication app) { _app = app; }