Search in sources :

Example 1 with ExtendWorkFlowBuildHistory

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());
}
Also used : ExtendWorkFlowBuildHistory(com.qlangtech.tis.coredefine.module.action.ExtendWorkFlowBuildHistory) ActionProxy(com.opensymphony.xwork2.ActionProxy) JSONObject(com.alibaba.fastjson.JSONObject) AjaxValve(com.qlangtech.tis.manage.common.valve.AjaxValve) JSONObject(com.alibaba.fastjson.JSONObject) Map(java.util.Map) NamedNodeMap(org.w3c.dom.NamedNodeMap)

Aggregations

JSONObject (com.alibaba.fastjson.JSONObject)1 ActionProxy (com.opensymphony.xwork2.ActionProxy)1 ExtendWorkFlowBuildHistory (com.qlangtech.tis.coredefine.module.action.ExtendWorkFlowBuildHistory)1 AjaxValve (com.qlangtech.tis.manage.common.valve.AjaxValve)1 Map (java.util.Map)1 NamedNodeMap (org.w3c.dom.NamedNodeMap)1