예제 #1
0
        public void CanAddTag()
        {
            var manager =  new AdminManager();
            var toAdd = new Tag();
            var tagCount = manager.GetAllTags().Count;

            toAdd.TagID = tagCount + 1;
            toAdd.TagName = "TestTag";

            manager.AddTag(toAdd);

            var secondCount = manager.GetAllTags().Count;
            Assert.AreEqual(tagCount + 1, secondCount);
        }
예제 #2
0
 public ActionResult CreateTag(Tag newTag)
 {
     var manager = new AdminManager();
     manager.AddTag(newTag);
     return RedirectToAction("TagIndex","Tag");
 }