public void TestDeleteMethodWhereItemDoesntExist() { Person person = new Person(203, "Delete203"); int count = CountItemsInDatabase(); DatabaseModifier.DeleteItemFromDatabase(person); int countAfter = CountItemsInDatabase(); Assert.AreEqual(count, countAfter); }
public void TestDeleteMethod() { Person person = new Person(104, "Delete104"); DatabaseModifier.AddData(person); int count = CountItemsInDatabase(); DatabaseModifier.DeleteItemFromDatabase(person); int countAfter = CountItemsInDatabase(); Assert.AreEqual(count - 1, countAfter); }