Пример #1
0
        public async Task GetAllAsync_TestRunRepository_ReturnsListCount10()
        {
            _testRunRepository = new TestRunRepository(_context);
            //Act
            var testRuns = await _testRunRepository.GetAllAsync();

            //Assert
            Assert.AreEqual(_context.TestRuns.Count(), testRuns.Count);
        }
Пример #2
0
        public async Task GetAllByUserAsync_TestRunRepository_ReturnsEmptyList()
        {
            //Arrange
            _testRunRepository = new TestRunRepository(_context);
            //Act
            var testRuns = await _testRunRepository.GetAllByUserAsync("johnnie depp");

            //Assert
            Assert.AreEqual(testRuns.Count, 0);
        }
 public GetTestDetailsQueryHandler(
     ITestRepository testRepository,
     IPcInfoRepository pcInfoRepository,
     ITestLineRepository testLineRepository,
     ITestRunRepository testRunRepository,
     IImageRepository imageRepository)
 {
     _testRepository     = testRepository;
     _pcInfoRepository   = pcInfoRepository;
     _testLineRepository = testLineRepository;
     _testRunRepository  = testRunRepository;
     _imageRepository    = imageRepository;
 }
Пример #4
0
        public async Task GetByIdAsync_TestRunRepository_ReturnsTestRunId()
        {
            //Arrange
            _testRunRepository = new TestRunRepository(_context);
            var testRuns = await _testRunRepository.GetAllAsync();

            var id = testRuns.ElementAt(1).Id;
            //Act
            var currentTestRun = await _testRunRepository.GetByIdAsync(id);

            //Assert
            Assert.AreEqual(currentTestRun.Id, id);
        }
Пример #5
0
        public async Task GetByIdAsync_TestRunRepository_Returns_Legit_Answer_Entity()
        {
            //Arrange
            _testRunRepository = new TestRunRepository(_context);
            var testRuns = await _testRunRepository.GetAllAsync();

            var id             = testRuns.ElementAt(0).Id;
            var currentTestRun = await _testRunRepository.GetByIdAsync(id);

            //Act
            var answer = currentTestRun.Answers.FirstOrDefault();

            //Assert
            Assert.AreEqual(answer.AnswerText, "1987");
            Assert.IsEmpty(answer.AnswerOptions);
        }
Пример #6
0
 public AssignmentService(IExerciseRepository exerciseRepository,
                          IChapterService chapterService,
                          IProjectService projectService,
                          IProjectComponentRepository projectComponentRepository,
                          ITestRepository testRepository,
                          ITestResultRepository testResultRepository,
                          IAssignmentWitResultsConverter assignmentWitResultsConverter,
                          ITestRunRepository testRunRepository)
 {
     _exerciseRepository            = exerciseRepository;
     _chapterService                = chapterService;
     _projectService                = projectService;
     _projectComponentRepository    = projectComponentRepository;
     _testRepository                = testRepository;
     _testResultRepository          = testResultRepository;
     _assignmentWitResultsConverter = assignmentWitResultsConverter;
     _testRunRepository             = testRunRepository;
 }
Пример #7
0
 public TestRunService(ITestRunRepository testRunRepository)
 {
     _testRunRepository = testRunRepository;
 }
Пример #8
0
 public TestRunController(ITestRunRepository testRunRepo)
 {
     _testRunRepository = testRunRepo;
 }
Пример #9
0
 public TestRunController(ITestRunRepository testRunRepository,
                          ApplicationDbContext context)
 {
     _testRunRepository = testRunRepository;
 }
 public TestRunsController(IMapper mapper, ITestRunRepository repository, IUnitOfWork unitOfWork)
 {
     this._unitOfWork = unitOfWork;
     this._repository = repository;
     this._mapper     = mapper;
 }