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); }
public ActionResult CreateTag(Tag newTag) { var manager = new AdminManager(); manager.AddTag(newTag); return RedirectToAction("TagIndex","Tag"); }