use of com.ngtesting.platform.vo.TestSuiteVo in project ngtesting-platform by aaronchen2k.
the class SuiteAction method saveCases.
@AuthPassport(validate = true)
@RequestMapping(value = "saveCases", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> saveCases(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestSuite po = suiteService.saveCases(json, userVo);
TestSuiteVo runVo = suiteService.genVo(po);
ret.put("data", runVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.TestSuiteVo in project ngtesting-platform by aaronchen2k.
the class SuiteAction method save.
@AuthPassport(validate = true)
@RequestMapping(value = "save", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> save(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestSuite po = suiteService.save(json, userVo);
TestSuiteVo vo = suiteService.genVo(po);
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.TestSuiteVo in project ngtesting-platform by aaronchen2k.
the class SuiteServiceImpl method getById.
@Override
public TestSuiteVo getById(Long caseId, Boolean withCases) {
TestSuite po = (TestSuite) get(TestSuite.class, caseId);
TestSuiteVo vo = genVo(po, withCases);
return vo;
}
use of com.ngtesting.platform.vo.TestSuiteVo in project ngtesting-platform by aaronchen2k.
the class SuiteServiceImpl method genVos.
@Override
public List<TestSuiteVo> genVos(List<TestSuite> pos) {
List<TestSuiteVo> vos = new LinkedList<TestSuiteVo>();
for (TestSuite po : pos) {
TestSuiteVo vo = genVo(po);
vos.add(vo);
}
return vos;
}
Aggregations