public List <Category> GetAllCategories() { try { List <Category> cat = _manager.GetAllCategories().ToList(); return(cat); } catch (Exception ex) { throw ex; } }
public void TestGetcategorylist() { try { var result = _repo.GetAllCategories(); Assert.NotNull(result); Assert.Greater(result.Count, 0); } catch (Exception ex) { Assert.Fail(ex.InnerException.Message); } }