public void OrderListIndex_IsReturned_WhenOrderIsAdded() { //Arrange OrderFunctionality o4 = new OrderFunctionality(); Order or1 = new Order(); o4.NewOrder(or1); Order or2 = new Order("REF-000-001", "test", "name", "1 High St", "town", "county", "12345", "01/03/2020"); o4.NewOrder(or2); //Act //Assert Assert.AreEqual(o4.OrderInformation("REF-000-001"), 1); }
public void OrderListIndex_IsReturned_WhenDefaultConstructorIsUsed() { //Arrange OrderFunctionality o5 = new OrderFunctionality(); Order or2 = new Order(); o5.NewOrder(or2); //Act //Assert Assert.AreEqual(o5.OrderInformation("REF-000-000"), 0); }
public void OrderDate_IsReturned_WhenOrderAdded() { //Arrange OrderFunctionality o9 = new OrderFunctionality(); Order o3 = new Order("REF-000-001", "test", "name", "1 High St", "town", "county", "12345", "01/04/2025"); o9.NewOrder(o3); //Act int i = o9.OrderInformation("REF-000-001"); //Assert Assert.AreEqual(o9.OrderOrderDate(i), "01/04/2025"); }
public void CustomerPostcode_IsReturned_WhenOrderAdded() { //Arrange OrderFunctionality o9 = new OrderFunctionality(); Order o3 = new Order("REF-000-001", "test", "name", "1 High St", "town", "county", "BT71AA", "01/03/2020"); o9.NewOrder(o3); //Act int i = o9.OrderInformation("REF-000-001"); //Assert Assert.AreEqual(o9.OrderPostcode(i), "BT71AA"); }