public async Task UpdateCategory() { try { CategoryModel cat = _repo.getCategoryid(2); cat.Cdetails = "Buy best"; await _repo.updatecategory(cat); CategoryModel cat1 = _repo.getCategoryid(2); Assert.AreSame(cat, cat1); } catch (Exception ex) { Assert.Fail(ex.InnerException.Message); } }
public async Task <bool> updatecategory(Category obj) { try { bool cat = await _manager.updatecategory(obj); if (cat == true) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }