public static CaseInstance createMockCaseInstance(String tenantId) { CaseInstance mock = mock(CaseInstance.class); when(mock.getId()).thenReturn(EXAMPLE_CASE_INSTANCE_ID); when(mock.getBusinessKey()).thenReturn(EXAMPLE_CASE_INSTANCE_BUSINESS_KEY); when(mock.getCaseDefinitionId()).thenReturn(EXAMPLE_CASE_INSTANCE_CASE_DEFINITION_ID); when(mock.getTenantId()).thenReturn(tenantId); when(mock.isActive()).thenReturn(EXAMPLE_CASE_INSTANCE_IS_ACTIVE); when(mock.isCompleted()).thenReturn(EXAMPLE_CASE_INSTANCE_IS_COMPLETED); when(mock.isTerminated()).thenReturn(EXAMPLE_CASE_INSTANCE_IS_TERMINATED); return mock; }
public static CaseInstanceDto fromCaseInstance(CaseInstance instance) { CaseInstanceDto result = new CaseInstanceDto(); result.id = instance.getId(); result.caseDefinitionId = instance.getCaseDefinitionId(); result.businessKey = instance.getBusinessKey(); result.tenantId = instance.getTenantId(); result.active = instance.isActive(); result.completed = instance.isCompleted(); result.terminated = instance.isTerminated(); return result; }
public static CaseInstanceDto fromCaseInstance(CaseInstance instance) { CaseInstanceDto result = new CaseInstanceDto(); result.id = instance.getId(); result.caseDefinitionId = instance.getCaseDefinitionId(); result.businessKey = instance.getBusinessKey(); result.tenantId = instance.getTenantId(); result.active = instance.isActive(); result.completed = instance.isCompleted(); result.terminated = instance.isTerminated(); return result; }
public static CaseInstanceDto fromCaseInstance(CaseInstance instance) { CaseInstanceDto result = new CaseInstanceDto(); result.id = instance.getId(); result.caseDefinitionId = instance.getCaseDefinitionId(); result.businessKey = instance.getBusinessKey(); result.tenantId = instance.getTenantId(); result.active = instance.isActive(); result.completed = instance.isCompleted(); result.terminated = instance.isTerminated(); return result; }