Example #1
0
        public void TestFindOrdersByCustomerAndStoreFail()
        {
            var customerOrderRepository  = new CustomerOrderRepository(null, mContext);
            var ordersByCustomerAndStore =
                customerOrderRepository.FindOrdersByCustomerAndStoreAsync(-1, -1).Result;

            Assert.Empty(ordersByCustomerAndStore);
        }
Example #2
0
        public void TestFindOrdersByCustomerAndStore()
        {
            var customerOrderRepository  = new CustomerOrderRepository(null, mContext);
            var ordersByCustomerAndStore =
                customerOrderRepository.FindOrdersByCustomerAndStoreAsync(1, 1).Result;

            Assert.Single(ordersByCustomerAndStore);
            Assert.Equal(1, ordersByCustomerAndStore.First().CustomerId);
            Assert.Equal(1, ordersByCustomerAndStore.First().StoreId);
        }