public void TaskNotFoundTest() { var contest = new Contest(); _contestsRepository.Stub(o => o.Get(1)).Return(contest); var result = _service.GetStatement(1, "A"); Assert.IsNull(result); }
public ActionResult Task(int contestId, string label) { var model = _contestsService.GetStatement(contestId, label); if (model == null) { return(HttpNotFound()); } if (model.Contest.IsNotStarted) { return(View("NotStartedContest")); } return(View(model)); }