Пример #1
0
 @RequestMapping(
     value = "/source",
     method = {RequestMethod.GET})
 @ResponseBody
 public String getSourceCode(@RequestParam("relativePath") String relativePath) {
   return testCaseService.getSourceCode(projectService.getActiveProject(), relativePath);
 }
Пример #2
0
 @RequestMapping(
     value = "/detail",
     method = {RequestMethod.POST})
 @ResponseBody
 public TestDetail getTestDetail(@RequestBody Test test) {
   return testCaseService.getTestDetail(projectService.getActiveProject(), test);
 }
Пример #3
0
 @RequestMapping(
     value = "/count",
     method = {RequestMethod.GET})
 @ResponseBody
 public long getTestCount() {
   return testCaseService.getTestCount(projectService.getActiveProject());
 }
Пример #4
0
 @RequestMapping(
     value = "/latest",
     method = {RequestMethod.GET})
 @ResponseBody
 public List<TestGroup> getLatest() {
   return testCaseService.getLatest(projectService.getActiveProject(), 8);
 }
Пример #5
0
 @RequestMapping(
     value = "/source",
     method = {RequestMethod.PUT})
 @ResponseBody
 public void updateSourceCode(
     @RequestParam("relativePath") String relativePath, @RequestBody String newSourceCode) {
   testCaseService.updateSourceCode(
       projectService.getActiveProject(), relativePath, newSourceCode);
 }
Пример #6
0
 @RequestMapping(method = {RequestMethod.GET})
 @ResponseBody
 public List<TestGroup> list() {
   return testCaseService.getTestPackages(projectService.getActiveProject());
 }