public async Task GetAllAsync_TestRunRepository_ReturnsListCount10() { _testRunRepository = new TestRunRepository(_context); //Act var testRuns = await _testRunRepository.GetAllAsync(); //Assert Assert.AreEqual(_context.TestRuns.Count(), testRuns.Count); }
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; }
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); }
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); }
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; }
public TestRunService(ITestRunRepository testRunRepository) { _testRunRepository = testRunRepository; }
public TestRunController(ITestRunRepository testRunRepo) { _testRunRepository = testRunRepo; }
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; }