internal static void UpdateTestCase(UpdateTestCaseParams updateTestCaseParams)
 {
     if (GetIdFromTags(updateTestCaseParams.ScenarioInfo.Tags) != null)
     {
         var livingDocumentation = GetLivingDocumentation();
         var testCase = BuildTestCase(updateTestCaseParams);
         livingDocumentation.UpdateTestCase(testCase);
     }
 }
Example #2
0
 public async Task <TestCaseDto> UpdateTestCase([FromRoute] int id, [FromBody] UpdateTestCaseParams ps)
 {
     ps.Id = id;
     return(_mapper.Map <TestCaseDto>(await _service.UpdateAsync(ps)));
 }
 internal static TestCase BuildTestCase(UpdateTestCaseParams updateTestCaseParams)
 {
     return new TestCase
     {
         Id = GetIdFromTags(updateTestCaseParams.ScenarioInfo.Tags),
         Name = updateTestCaseParams.ScenarioInfo.Title,
         LastRunDate = DateTime.Now,
         LastStatus = updateTestCaseParams.LastStatus,
         Steps = (updateTestCaseParams.GivenText + updateTestCaseParams.WhenText).Replace("\n", "<br/>"),
         Success = updateTestCaseParams.ThenText.Replace("\n", "<br/>")
     };
 }