use of com.qlangtech.tis.coredefine.module.action.ExtendWorkFlowBuildHistory in project tis by qlangtech.
the class TestCollectionAction method testDoGetTaskStatus.
public void testDoGetTaskStatus() throws Exception {
request.setParameter("emethod", "getTaskStatus");
request.setParameter("action", "collection_action");
JSONObject content = new JSONObject();
int taskId = 644;
content.put(IParamContext.KEY_TASK_ID, taskId);
content.put(CollectionAction.KEY_SHOW_LOG, true);
request.setContent(content.toJSONString().getBytes(TisUTF8.get()));
ActionProxy proxy = getActionProxy();
String result = proxy.execute();
assertEquals("CollectionAction_ajax", result);
AjaxValve.ActionExecResult aResult = showBizResult();
assertNotNull(aResult);
assertTrue(aResult.isSuccess());
Map<String, Object> bizResult = (Map<String, Object>) aResult.getBizResult();
assertNotNull(bizResult.get("log"));
ExtendWorkFlowBuildHistory status = (ExtendWorkFlowBuildHistory) bizResult.get("status");
assertNotNull(status);
assertEquals(taskId, status.getId().intValue());
}
Aggregations