public void SetPaymentMethodTest() { //Arrange ServiceCustomerOrder order = new ServiceCustomerOrder(); DataCustomerOrder dco = new DataCustomerOrder(); ServiceCustomerOrder testOrder; order.DateOrder = DateTime.Today; order.FinalPrice = 5000; order.Status = "Test Status"; order.PaymentMethod = 1; order.CustomerId = 1; //Act int idOfTestOrder = dco.InsertOrder(order); testOrder = dco.GetOrder(idOfTestOrder); //Assert Assert.IsNotNull(testOrder.PaymentMethod); }
public void OrderWithoutDiscount() { //ARRANGE ServiceCustomerOrder order = new ServiceCustomerOrder(); DataCustomerOrder dco = new DataCustomerOrder(); ServiceCustomerOrder testOrder = new ServiceCustomerOrder(); // Set all attributes except Discount order.DateOrder = DateTime.Today; order.FinalPrice = 1000; order.Status = "Test Status"; order.PaymentMethod = 1; order.CustomerId = 1; //ACT int testId = dco.InsertOrder(order); testOrder = dco.GetOrder(testId); //ASSERT Assert.IsNotNull(testOrder); }
public int InsertOrder(ServiceCustomerOrder order) { return(dataCustomerOrder.InsertOrder(order)); }