Пример #1
0
        public void TaskNotFoundTest()
        {
            var contest = new Contest();

            _contestsRepository.Stub(o => o.Get(1)).Return(contest);
            var result = _service.GetStatement(1, "A");

            Assert.IsNull(result);
        }
Пример #2
0
        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));
        }