Example #1
0
        private async Task UpdateTestRunnerLastAvailable(Guid testRunId)
        {
            var testRunAvailability = new TestRunAvailabilityDto
            {
                TestRunId     = testRunId,
                LastAvailable = _dateTimeProvider.GetCurrentTime(),
            };

            await _testRunAvailabilityServiceClient.CreateAsync(testRunAvailability).ConfigureAwait(false);
        }
Example #2
0
        private async Task UpdateTestRunnerLastAvailable(Guid testRunId)
        {
            var testRunAvailability = new TestRunAvailabilityDto
            {
                TestRunId     = testRunId,
                LastAvailable = _dateTimeProvider.GetCurrentTime(),
            };

            // DEBUG:
            ////_consoleProvider.WriteLine();
            _consoleProvider.WriteLine($"UPDATE Test Run on machine {_environmentService.MachineName} {_dateTimeProvider.GetCurrentTime()}");

            await _testRunAvailabilityServiceClient.CreateAsync(testRunAvailability);
        }
Example #3
0
        public async Task <IActionResult> CreateTestRunAvailabilityAsync([FromBody] TestRunAvailabilityDto testRunAvailabilityDto)
        {
            if (testRunAvailabilityDto == null)
            {
                return(BadRequest());
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var testRunAvailability = Mapper.Map <TestRunAvailability>(testRunAvailabilityDto);

            var result = await _meissaRepository.InsertWithSaveAsync(testRunAvailability);

            var resultDto = Mapper.Map <TestRunAvailabilityDto>(result);

            return(Ok(resultDto));
        }