Examples of HistoricCaseInstance


Examples of org.camunda.bpm.engine.history.HistoricCaseInstance

    mockList.add(createMockHistoricCaseInstance());
    return mockList;
  }

  public static HistoricCaseInstance createMockHistoricCaseInstance() {
    HistoricCaseInstance mock = mock(HistoricCaseInstance.class);

    when(mock.getId()).thenReturn(EXAMPLE_CASE_INSTANCE_ID);
    when(mock.getBusinessKey()).thenReturn(EXAMPLE_CASE_INSTANCE_BUSINESS_KEY);
    when(mock.getCaseDefinitionId()).thenReturn(EXAMPLE_CASE_DEFINITION_ID);
    when(mock.getCreateTime()).thenReturn(DateTimeUtil.parseDate(EXAMPLE_HISTORIC_CASE_INSTANCE_CREATE_TIME));
    when(mock.getCloseTime()).thenReturn(DateTimeUtil.parseDate(EXAMPLE_HISTORIC_CASE_INSTANCE_CLOSE_TIME));
    when(mock.getDurationInMillis()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_DURATION_MILLIS);
    when(mock.getCreateUserId()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_CREATE_USER_ID);
    when(mock.getSuperCaseInstanceId()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_SUPER_CASE_INSTANCE_ID);
    when(mock.isActive()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_IS_ACTIVE);
    when(mock.isCompleted()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_IS_COMPLETED);
    when(mock.isTerminated()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_IS_TERMINATED);
    when(mock.isClosed()).thenReturn(EXAMPLE_HISTORIC_CASE_INSTANCE_IS_CLOSED);

    return mock;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.history.HistoricCaseInstance

    mockList.add(createMockHistoricCaseInstanceNotClosed());
    return mockList;
  }

  public static HistoricCaseInstance createMockHistoricCaseInstanceNotClosed() {
    HistoricCaseInstance mock = createMockHistoricCaseInstance();

    when(mock.getCloseTime()).thenReturn(null);
    when(mock.getDurationInMillis()).thenReturn(null);
    when(mock.isActive()).thenReturn(true);
    when(mock.isCompleted()).thenReturn(false);
    when(mock.isTerminated()).thenReturn(false);
    when(mock.isClosed()).thenReturn(false);

    return mock;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.