public void GetByCustomerID_ShouldReturnCorrectContents() { KomodoCustomer_Repo repo = new KomodoCustomer_Repo(); KomodoCustomer customer = new KomodoCustomer(001, "Hambright", new DateTime(1984, 11, 12), new DateTime(2015, 01, 02)); repo.AddCustomerToDirectory(customer); int id = 001; KomodoCustomer searchResult = repo.GetCustomerByID(id); Assert.AreEqual(searchResult.CustomerID, id); }
public void DeleteExistingContent_ShouldReturnTrue() { KomodoCustomer_Repo repo = new KomodoCustomer_Repo(); KomodoCustomer customer = new KomodoCustomer(001, "Hambright", new DateTime(1984, 11, 12), new DateTime(2015, 01, 02)); repo.AddCustomerToDirectory(customer); KomodoCustomer oldCustomer = repo.GetCustomerByID(001); bool removeResults = repo.DeleteExistingCustomer(oldCustomer); Assert.IsTrue(removeResults); }