Search in sources :

Example 26 with TaskFormData

use of org.camunda.bpm.engine.form.TaskFormData in project camunda-bpm-platform by camunda.

the class TaskRestServiceInteractionTest method testGetForm_shouldReturnKeyContainingTaskId.

@Test
public void testGetForm_shouldReturnKeyContainingTaskId() {
    TaskFormData mockTaskFormData = MockProvider.createMockTaskFormDataUsingFormFieldsWithoutFormKey();
    when(formServiceMock.getTaskFormData(EXAMPLE_TASK_ID)).thenReturn(mockTaskFormData);
    given().pathParam("id", EXAMPLE_TASK_ID).header("accept", MediaType.APPLICATION_JSON).then().expect().statusCode(Status.OK.getStatusCode()).body("key", equalTo("embedded:engine://engine/:engine/task/" + EXAMPLE_TASK_ID + "/rendered-form")).body("contextPath", equalTo(MockProvider.EXAMPLE_PROCESS_APPLICATION_CONTEXT_PATH)).when().get(TASK_FORM_URL);
}
Also used : TaskFormData(org.camunda.bpm.engine.form.TaskFormData) Test(org.junit.Test)

Aggregations

TaskFormData (org.camunda.bpm.engine.form.TaskFormData)26 Task (org.camunda.bpm.engine.task.Task)10 Deployment (org.camunda.bpm.engine.test.Deployment)10 Test (org.junit.Test)9 FormField (org.camunda.bpm.engine.form.FormField)8 FormProperty (org.camunda.bpm.engine.form.FormProperty)5 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)4 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)4 LinkedHashMap (java.util.LinkedHashMap)3 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)2 FormType (org.camunda.bpm.engine.form.FormType)2 TaskEntity (org.camunda.bpm.engine.impl.persistence.entity.TaskEntity)2 TaskManager (org.camunda.bpm.engine.impl.persistence.entity.TaskManager)2 AbstractFoxPlatformIntegrationTest (org.camunda.bpm.integrationtest.util.AbstractFoxPlatformIntegrationTest)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 Calendar (java.util.Calendar)1 Date (java.util.Date)1 ProcessApplicationService (org.camunda.bpm.ProcessApplicationService)1