コード例 #1
0
  @Ignore
  @Test
  public void testGetNullWorkflowInstances()
      throws RepositoryException, XmlRpcException, IOException, InterruptedException {

    Thread.sleep(3000);
    WorkflowInstance instance = fmc.getWorkflowInstanceById("1234");

    assertThat(instance, is(nullValue()));
  }
コード例 #2
0
  @Test
  public void testGetWorkflowInstanceById()
      throws XmlRpcException, IOException, RepositoryException {

    List<WorkflowInstance> workflowlist = fmc.getWorkflowInstances();

    assertThat(workflowlist, is(not(nullValue())));

    assertThat(workflowlist.size(), is(not(0)));

    WorkflowInstance instance = fmc.getWorkflowInstanceById(workflowlist.get(0).getId());

    assertThat(instance, is(not(nullValue())));
  }
コード例 #3
0
  @Test
  public void testUpdateWorkflowInstanceStatus()
      throws XmlRpcException, IOException, RepositoryException {

    List<WorkflowInstance> workflowlist = fmc.getWorkflowInstances();

    assertThat(workflowlist, is(not(nullValue())));

    assertThat(workflowlist.size(), is(not(0)));

    WorkflowInstance instance = fmc.getWorkflowInstanceById(workflowlist.get(0).getId());

    assertThat(instance, is(not(nullValue())));

    boolean upd = fmc.updateWorkflowInstanceStatus(instance.getId(), "RUNNING");

    assertThat(upd, equalTo(true));
  }