use of com.ngtesting.platform.vo.TestCaseInSuiteVo in project ngtesting-platform by aaronchen2k.
the class SuiteServiceImpl method genCaseVo.
@Override
public TestCaseInSuiteVo genCaseVo(TestCaseInSuite po) {
TestCaseInSuiteVo vo = new TestCaseInSuiteVo();
TestCase testcase = po.getTestCase();
BeanUtilEx.copyProperties(vo, testcase);
// }
return vo;
}
use of com.ngtesting.platform.vo.TestCaseInSuiteVo in project ngtesting-platform by aaronchen2k.
the class SuiteServiceImpl method genVo.
@Override
public TestSuiteVo genVo(TestSuite po, Boolean withCases) {
TestSuiteVo vo = new TestSuiteVo();
vo.setId(po.getId());
vo.setName(po.getName());
vo.setEstimate(po.getEstimate());
vo.setDescr(po.getDescr());
vo.setProjectId(po.getProjectId());
vo.setUserId(po.getUserId());
TestUser user = (TestUser) get(TestUser.class, po.getUserId());
vo.setUserName(user.getName());
vo.setCreateTime(po.getCreateTime());
vo.setUpdateTime(po.getUpdateTime());
int count = 0;
if (withCases) {
for (TestCaseInSuite p : po.getTestcases()) {
TestCaseInSuiteVo v = genCaseVo(p);
vo.getTestcases().add(v);
if (p.getLeaf()) {
count++;
}
}
} else {
vo.setCount(countCase(vo.getId()).intValue());
}
return vo;
}
Aggregations