public async Task FilterRecipes_Returns_BadRequest_When_Arguments_Are_Invalid() { // Arrange var recipesService = Substitute.For <IRecipesService>(); var controller = new RecipesController(recipesService, AutoMapper.Mapper.Instance); var filter = new FilterRecipeDTO { Text = null, Tags = null }; // Act var result = await controller.FilterRecipes(filter); // Assert Assert.True(result.GetType().IsAssignableFrom(typeof(BadRequestResult))); }