public void FindPetsByStatusTest() { // TODO: add unit test for the method 'FindPetsByStatus' List <string> status = null; // TODO: replace null with proper value var response = instance.FindPetsByStatus(status); Assert.IsInstanceOf <List <Pet> > (response, "response is List<Pet>"); }
public void FindPetsByStatus_ReturnsListOfPetsFiltered() { List <Pet> pets = _petApi.FindPetsByStatus(new List <string>(new[] { "available" })); foreach (Pet pet in pets) { Assert.IsType <Pet>(pet); Assert.Equal(Pet.StatusEnum.Available, pet.Status); } }
public void TestFindPetByStatus() { PetApi petApi = new PetApi(); List <String> statusList = new List <String>(new String[] { "available" }); List <Pet> listPet = petApi.FindPetsByStatus(statusList); foreach (Pet pet in listPet) // Loop through List with foreach. { Assert.IsInstanceOf <Pet> (pet, "Response is a Pet"); Assert.AreEqual("available", pet.Status); } }