Exemplo n.º 1
0
        public ChartComplementary()
        {
            lastInserted = new ChartObject();
            prodRow = new Product();

            message = new Message();
        }
        public void SaveProduct_ShouldReturnSimpleOK()
        {
            var p = new Product();
            p.Name = "test";
            p.Id = 4;
            p.Category = "testcat";

            var controller = new ProductController();
            Task<IHttpActionResult> response = controller.SaveProduct(p);

            Assert.IsNotNull(response);
            Assert.IsInstanceOfType(response.Result, typeof(OkResult));

        }
 public async Task<IHttpActionResult> SaveProduct(Product p)
 {
     return Ok();
     //return InternalServerError();
 }