public IActionResult AdoptableCats() { ShelfViewModel viewModel = new ShelfViewModel { Cats = catService.GetAdoptableCats(), OnlyAdoptable = true }; return(View("Cats", viewModel)); }
public void GetAdoptableCats_ShouldReturnOnlyAdoptableCats() { // Arrange repositoryMock.Setup(x => x.GetAllCats()).Returns(CatMocks.GetCatList()); // Act var result = catService.GetAdoptableCats(); // Assert Assert.IsTrue(result.All(x => x.CanBeAdopted)); }