public void ReturnTrue_WhenOneCustomerIsAdded() //WORKING { CustomerBase customerBase = new CustomerBase(); Assert.IsTrue(customerBase.getListSize() == 0); Assert.IsTrue(customerBase.Add(new Customer("John", 1234))); Assert.IsTrue(customerBase.getListSize() == 1); }
public void ReturnTrue_WhenThreeCustomersAreAdded() //WORKING { CustomerBase customerBase = new CustomerBase(); Assert.IsTrue(customerBase.getListSize() == 0); Assert.IsTrue(customerBase.Add(new Customer("John", 4))); Assert.IsTrue(customerBase.Add(new Customer("Abraham", 3456))); Assert.IsTrue(customerBase.Add(new Customer("Isaac", 7890))); Assert.IsTrue(customerBase.getListSize() == 3); }
public void ReturnFalse_WhenNameIsAnEmptyStringOrNull() //WORKING { CustomerBase customerBase = new CustomerBase(); Assert.IsFalse(customerBase.Add(new Customer("", 4444))); Assert.IsFalse(customerBase.Add(new Customer(null, 2222))); Assert.IsTrue(customerBase.getListSize() == 0); }
public void ReturnFalse_WhenCustomerIdDoesNotExist() { CustomerBase customerBase = new CustomerBase(); customerBase.Add(new Customer("Abraham", 8734)); customerBase.Add(new Customer("Lincoln", 9010)); Assert.IsFalse(customerBase.Delete(7777)); Assert.IsTrue(customerBase.getListSize() == 2); }
public void ReturnTrue_WhenCustomerIsDeleted() { CustomerBase customerBase = new CustomerBase(); customerBase.Add(new Customer("Joseph", 1329)); customerBase.Add(new Customer("Brigham", 8791)); Assert.IsTrue(customerBase.Delete(1329)); Assert.IsTrue(customerBase.Delete(8791)); Assert.IsTrue(customerBase.getListSize() == 0); }