public void TestGetDogFalseId(string id, int index) { var dogService = new DogService(); dogService.PostDog(_dogList[index]); Assert.Throws <Exception>(() => dogService.GetDog(id)); }
public void TestGetDog(int index) { var dogService = new DogService(); dogService.PostDog(_dogList[index]); var result = dogService.GetDog(_dogList[index].Id); Assert.AreEqual(_dogList[index], result); }
public void TestGetDogNullOrEmptyId(string id) { var dogService = new DogService(); Assert.Throws <Exception>(() => dogService.GetDog(id)); }