public void GetAllProdutos_ShouldReturnAllProdutosDTO() { // Arrange var TestContext = ProducaoContextMocker.GetProducaoContext(); var theController = new ProdutoController(TestContext); //Act var result = theController.GetProdutos(); //Assert Assert.NotNull(result); Assert.IsType <List <ProdutoDTO> >(result); }
public void GetProdutoByNome_ShouldReturnProdutoDTO() { // Arrange var TestContext = ProducaoContextMocker.GetProducaoContext(); var theController = new ProdutoController(TestContext); String nome = "ProdutoBase"; //Act var result = theController.GetProdutoByNome(nome); //Assert Assert.NotNull(result); Assert.IsType <ActionResult <ProdutoDTO> >(result); }