Пример #1
0
        public void TestFindOrdersByCustomerFail()
        {
            var customerOrderRepository = new CustomerOrderRepository(null, mContext);
            var ordersByCustomer        = customerOrderRepository.FindOrdersByCustomerAsync(-1).Result;

            Assert.Empty(ordersByCustomer);
        }
Пример #2
0
        public void TestFindOrdersByCustomer()
        {
            var customerOrderRepository = new CustomerOrderRepository(null, mContext);
            var ordersByCustomer        = customerOrderRepository.FindOrdersByCustomerAsync(1).Result;

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