コード例 #1
0
 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));
 }
コード例 #2
0
 public TestAttemptController(ITestCalculationService service, ITestRepository repository, ITestAttemptViewModelConverter converter)
 {
     _service    = service;
     _repository = repository;
     _converter  = converter;
 }
コード例 #3
0
 public void OneTimeSetUp()
 {
     _sut = new TestCalculationService();
 }