public ActionResult EditPage(int id) { var manager = new AdminManager(); var page = manager.GetPageByID(id); return View(page); }
public void CanDeleteStaticPage() { var manager = new AdminManager(); var pageCount = manager.GetAllPages().Count; var page = manager.GetPageByID(pageCount); manager.DeletePage(page); var secondCount = manager.GetAllPages().Count; Assert.AreEqual(pageCount -1, secondCount); }
public void CanGetStaticPagesById() { var manager = new AdminManager(); var page = manager.GetPageByID(1); Assert.AreEqual(page.PageID, 1); }
public void CancEditStaticPage() { var manager = new AdminManager(); var toEdit = manager.GetPageByID(manager.GetAllPages().Count); toEdit.PageTitle = "Edited Static Page Title"; manager.EditPage(toEdit); var toCheck = manager.GetPageByID(manager.GetAllPages().Count); Assert.AreEqual(toEdit.PageTitle, toCheck.PageTitle); }