public void SetUp() { _contextMock = new Mock<IDbContext>(); _compiler = new TestCompiler(); _runner = new TestRunner(); var scores = new Collection<Score> { }; scores.Add(new Score { Assignment = new Assignment { Id = 1 } }); _participant = new Participant { Id = 1, Email = "", Scores = scores, UserSetting = null }; Progress progress = new Progress { Assignment = new Assignment { Id = 1, MaxSolveTime = 1000, RunCodeInput = "test", RunCodeOuput = "test" }, Id = 1, StartTime = DateTime.Now, Participant = _participant }; _participant.Progress = progress; _controller = new ScoresController(_contextMock.Object, _compiler, _runner, _participant); MapperConfig.Configure(); }
public void SetScoresConstructorWithoutGivenParticipantGivesInvalidOperationFromTest() { _controller = new ScoresController(_contextMock.Object, _compiler, _runner); }