public async Task RecipeInstructions_OkResult() { RecipeRepository recipe = new RecipeRepository(_options, new HttpClient(), _cacheServiceMock.Object); var controller = new RecipesController(recipe, _mapper, _logger); var result = await controller.RecipeInstructions(1, false); result.Should().NotBeNull(); var okResult = result.Should().BeOfType <OkObjectResult>().Subject; }
public async Task RecipeInstructions_OkResult2() { RecipeRepository recipe = new RecipeRepository(_options, new HttpClient(), _cacheServiceMock.Object); var controller = new RecipesController(recipe, _mapper, _logger); var result = await controller.RecipeInstructions(0); result.Should().NotBeNull(); var okObject = result.Should().BeOfType <OkObjectResult>().Subject; Assert.True(okObject.StatusCode.Equals(200)); }