public PassingTestService(IUnitOfWork unitOfWork, IMapper mapper, IOptions <TimeErrorSetting> timeErrorSetting, ITestCalculationService testCalculationService) { this.unitOfWork = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork)); this.testRepository = unitOfWork.GetRepository <Test, ITestRepository>() ?? throw new NullReferenceException(nameof(testRepository)); this.testEventRepository = unitOfWork.GetRepository <TestEvent, ITestEventRepository>() ?? throw new NullReferenceException(nameof(testEventRepository)); this.testResultRepository = unitOfWork.GetRepository <TestResult, ITestResultRepository>() ?? throw new NullReferenceException(nameof(testResultRepository)); this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); this.timeErrorSetting = timeErrorSetting?.Value ?? throw new ArgumentNullException(nameof(timeErrorSetting)); this.testCalculationService = testCalculationService ?? throw new ArgumentNullException(nameof(testCalculationService)); }
public TestAttemptController(ITestCalculationService service, ITestRepository repository, ITestAttemptViewModelConverter converter) { _service = service; _repository = repository; _converter = converter; }
public void OneTimeSetUp() { _sut = new TestCalculationService(); }