public IActionResult Get(long id) { try { var searchedTestSuite = __app.GetById(id); if (searchedTestSuite == null) { return(NotFound(new ApiResponse(ApiResponseState.Failed, "Test Suite not Found"))); } return(Ok(new ApiResponse(ApiResponseState.Success, searchedTestSuite))); } catch (Exception ex) { return(HandleError(ex)); } }
public EntityValidationResult IsValid(TestCase testCase) { try { var validation = new EntityValidationResult(); validation.Status = true; validation.ValidationMessages = new List <string>(); var testSuite = __testSuiteApp.GetById(testCase.TestSuiteId); if (testSuite == null) { validation.Status = false; validation.ValidationMessages.Add("Test Suite Not Found"); } return(validation); } catch (Exception) { throw; } }