Exemplo n.º 1
0
        public void Success_UpdateOrders()
        {
            //Arrange
            string result;
            Order  order;

            //Act
            order = new Order
            {
                Price     = 801.0,
                IsShipped = true,
                Username  = user.Username
            };

            result = db_order.CreateOrder(order);

            if (result.Equals("Success"))
            {
                order.Id     = db_order.FindOrderByPrice(order.Price)[0].Id;
                order.Price += 0.5;

                result = db_order.UpdateOrder(order);
            }

            //Assert
            Assert.AreEqual("Success", result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Updates an order.
 /// </summary>
 /// <param name="order"></param>
 /// <returns>string</returns>
 public string Update(Order order)
 {
     return(db_order.UpdateOrder(order));
 }