public void Customer_CreateNewOrder5() { Customer customer = new Customer() { ID = 12, UserName = "******", Password = "******", FirstName = "John", LastName = "Doe", CreditNumber = "4580" }; CustomerForms customerForms = new CustomerForms(TestMode.On, customer); customerForms.input.Injections = new List <object>() { 16, 1 }; customerForms.CreateNewOrder(); List <Order> orders = new StoreDAO().GetCustomerOrders(customer.ID); // Getting the latest order: Order order = orders[orders.Count - 1]; Assert.AreEqual(order.ProductName, "Batteries Pack"); Assert.AreEqual(order.CustomerID, 12); Assert.AreEqual(order.Amount, 1); Assert.AreEqual(order.TotalPrice, 8); }
public void Customer_LogIn() { CustomerForms customerForms = new CustomerForms(TestMode.On); customerForms.input.Injections = new List <object>() { "jdoe", "Wrong password" // Inserting a wrong password. }; customerForms.CustomerLogInForm(); }
public void Customer_NewCustomerForm() { CustomerForms customerForms = new CustomerForms(TestMode.On); customerForms.input.Injections = new List <object>() { "jdoe", "fake password", "fake name", "fake last name", "fake credit card" }; customerForms.NewCustomerForm(); }
public void Customer_CreateNewOrder2() { Customer customer = new Customer() { ID = 12, UserName = "******", Password = "******", FirstName = "John", LastName = "Doe", CreditNumber = "4580" }; CustomerForms customerForms = new CustomerForms(TestMode.On, customer); customerForms.input.Injections = new List <object>() { 23, -1 }; customerForms.CreateNewOrder(); }