public void Delete() { CategoriasController controller = new CategoriasController(container); System.Web.Http.Results.OkNegotiatedContentResult <Categoria> result = (System.Web.Http.Results.OkNegotiatedContentResult <Categoria>)controller.DeleteCategoria(3); Assert.IsNull(container.GetCategoria(3)); }
public void GetBySlug() { CategoriasController controller = new CategoriasController(container); System.Web.Http.Results.OkNegotiatedContentResult <Categoria> result = (System.Web.Http.Results.OkNegotiatedContentResult <Categoria>)controller.GetCategoria("computador", "laptop"); Assert.IsNotNull(result); Assert.AreEqual("laptop", result.Content.Slug); }