Example #1
0
        public ManageOrdersTest()
        {
            var _mockUnitOfWork = new Mock <IUnitOfWork>();

            _mockOrderRepository = new Mock <IOrderRepository>(MockBehavior.Loose);
            _mockUnitOfWork.Setup(x => x.OrderRepository).Returns(_mockOrderRepository.Object);
            _manageOrders = new ManageOrders(_mockUnitOfWork.Object);
        }
Example #2
0
 public static void Configure(bool isDev)
 {
     if (isDev)
     {
         Products = new MockProductsRepo();
         States   = new MockStatesRepo();
         Orders   = new MockOrderRepo();
     }
     else
     {
         Products = new ProductsRepo();
         States   = new StatesRepo();
         Orders   = new OrdersRepo();
     }
 }