public void TestGetbycategory_success(int cid)
 {
     try
     {
         var result = controller.getcategory(cid);
         Assert.IsNotNull(result);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.InnerException.Message);
     }
 }
 public void TestAddcategory(int cid, string cname, string cdetails)
 {
     try
     {
         CategoryModel cat = new CategoryModel {
             Cid = cid, Cname = cname, Cdetails = cdetails
         };
         var mock = new Mock <IManager>();
         mock.Setup(x => x.AddCategory(cat)).ReturnsAsync(true);
         var res = controller.getcategory(cid);
         Assert.NotNull(res);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.InnerException.Message);
     }
 }