/// <summary> /// Display List of pet names under each Gender type /// </summary> /// <returns></returns> public async Task OnGet() { var maleOwnerCatList = await _petListerService.GetPets(Sex.Male); var femaleOwnerCatList = await _petListerService.GetPets(Sex.Female); if (maleOwnerCatList == null) { _logger.LogInformation("No Male Owner Cats to Display."); return; } if (maleOwnerCatList == null) { _logger.LogInformation("No Female Owner Cats to Display."); return; } Console.WriteLine("~~~ Male ~~~"); foreach (var pet in maleOwnerCatList) { Console.WriteLine(pet.Name); } Console.WriteLine("\n\n~~~ Female ~~~"); foreach (var pet in femaleOwnerCatList) { Console.WriteLine(pet.Name); } Console.ReadLine(); }
public void GetPets_IsNotNull_RetunsExpectedResults(Sex sex) { // Arrange // Act var result = petListerService.GetPets(sex); // Assert Assert.IsNotNull(result); }