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);
}
Aggregations