Пример #1
0
        public void Success_FindOrderByIsShipped()
        {
            //Arrange
            int          index;
            int          max_index;
            List <Order> result;

            //Act
            index     = 0;
            max_index = 100;

            while (index < max_index)
            {
                Order order = new Order
                {
                    Price     = 601.0 + index,
                    IsShipped = false,
                    Username  = user.Username
                };

                db_order.CreateOrder(order);

                index++;
            }

            result = db_order.FindOrderByIsShipped(false);

            //Assert
            Assert.IsTrue(result.Count >= max_index);
        }
Пример #2
0
 /// <summary>
 /// Finds a list of orders by their is_shipped.
 /// </summary>
 /// <param name="is_shipped"></param>
 /// <returns>List<Order></returns>
 public List <Order> FindByIsShipped(bool is_shipped)
 {
     return(db_order.FindOrderByIsShipped(is_shipped));
 }