示例#1
0
        public async Task TestAddCategory_success(int cid, string cname, string cdetails)
        {
            try
            {
                await _repo.AddCategory(new Category()
                {
                    Cid      = cid,
                    Cname    = cname,
                    Cdetails = cdetails,
                });

                var x = _repo.getCategoryid(cid);
                Assert.NotNull(x);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.InnerException.Message);
            }
        }