public void setstatusTest() { int id = 3; int status = 3; PlanDAO pDAO = new PlanDAO(); Plan actual = pDAO.showPlanInfo(id); int temp = actual.status; actual.status = status; pDAO.setStatus(id, status); Plan expect = pDAO.showPlanInfo(id); Assert.AreEqual(actual.status, expect.status); pDAO.setStatus(id, temp); }
//Просмотр информации о плане public ActionResult ShowPlanInfo(int id) { int tId = id; Plan plan = pDAO.showPlanInfo(tId); List <Step> steps = stepDAO.getStepsByPlanId(tId); PlanAndStepsViewModel pASVM = new PlanAndStepsViewModel(plan, steps); return(View(pASVM)); }