示例#1
0
        public void CanDeleteCategory()
        {
            PostRepo        repo = new PostRepo();
            List <Category> Cats = repo.GetAllCategories();

            Assert.AreEqual(3, Cats.Count);
            repo.DeleteCategory(1);
            List <Category> Cats2 = repo.GetAllCategories();

            Assert.AreEqual(2, Cats2.Count);
            Assert.AreEqual(2, Cats2[0].CategoryID);
        }