public IActionResult Delete(int id) { Animals existing = service.SelectByID(id); return(View(existing)); }
public void TestSelectByID() { var animal = service.SelectByID(2); string animalName = animal.Name; // Assert Assert.Equal("Ralph", animalName); }
public void TestUpdate() { ServiceSeeder.Seed(service); var beforeName = service.SelectByID(1); beforeName.AniName = "Test"; service.Update(beforeName); var afterName = service.SelectByID(1); Assert.Equal("Test", afterName.AniName); }