Esempio n. 1
0
        public ActionResult EditTag(int id)
        {
            var manager = new AdminManager();
            var tag = manager.GetTagById(id);

            return View(tag);
        }
Esempio n. 2
0
 public ActionResult DeleteTag(int id)
 {
     var manager = new AdminManager();
     var tag = manager.GetTagById(id);
     return View(tag);
     //  return RedirectToAction("TagIndex", "Tag");
 }
Esempio n. 3
0
 public void CanGetTagById()
 {
     var manager = new AdminManager();
     var tag = manager.GetTagById(1);
     Assert.AreEqual(tag.TagID, 1);
 }
Esempio n. 4
0
        public void CancEditTag()
        {
            var manager = new AdminManager();
            var toEdit = manager.GetTagById(manager.GetAllTags().Count);
            toEdit.TagName = "EditedTag";

            manager.EditTag(toEdit);
            var toCheck = manager.GetTagById(manager.GetAllTags().Count);

            Assert.AreEqual(toCheck.TagName,toEdit.TagName);
        }