Exemple #1
0
        public IActionResult Get(int testCaseId)
        {
            try
            {
                var testCase = _repository.GetTestCaseById(testCaseId);

                //need to map the collections of steps to the collection of step view models, so we will not return raw step
                return(Ok(Mapper.Map <IEnumerable <StepViewModel> >(testCase.Steps.OrderBy(s => s.Order).ToList())));
            }
            catch (Exception ex)
            {
                _logger.LogError("Failed to get steps: {0}", ex);
            }
            return(BadRequest("Failer to get steps"));
        }
Exemple #2
0
        //[HttpGet("/{testCaseId}")]
        public IActionResult Edit(int Id)
        {
            TestCase testCase = _repository.GetTestCaseById(Id);

            return(View(testCase));
        }