Java Code Examples for org.camunda.commons.utils.IoUtil#inputStreamAsString()
The following examples show how to use
org.camunda.commons.utils.IoUtil#inputStreamAsString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormServiceTest.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/DeployedFormsProcess.bpmn20.xml", "org/camunda/bpm/engine/test/api/form/start.form", "org/camunda/bpm/engine/test/api/form/task.form" }) @Test public void testGetDeployedStartForm() { // given String procDefId = repositoryService.createProcessDefinitionQuery().singleResult().getId(); // when InputStream deployedStartForm = formService.getDeployedStartForm(procDefId); // then assertNotNull(deployedStartForm); String fileAsString = IoUtil.fileAsString("org/camunda/bpm/engine/test/api/form/start.form"); String deployedStartFormAsString = IoUtil.inputStreamAsString(deployedStartForm); assertEquals(deployedStartFormAsString, fileAsString); }
Example 2
Source File: FormServiceTest.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/EmbeddedDeployedFormsProcess.bpmn20.xml", "org/camunda/bpm/engine/test/api/form/start.form", "org/camunda/bpm/engine/test/api/form/task.form" }) @Test public void testGetEmbeddedDeployedStartForm() { // given String procDefId = repositoryService.createProcessDefinitionQuery().singleResult().getId(); // when InputStream deployedStartForm = formService.getDeployedStartForm(procDefId); // then assertNotNull(deployedStartForm); String fileAsString = IoUtil.fileAsString("org/camunda/bpm/engine/test/api/form/start.form"); String deployedStartFormAsString = IoUtil.inputStreamAsString(deployedStartForm); assertEquals(deployedStartFormAsString, fileAsString); }
Example 3
Source File: FormServiceTest.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/DeployedFormsProcess.bpmn20.xml", "org/camunda/bpm/engine/test/api/form/start.form", "org/camunda/bpm/engine/test/api/form/task.form" }) @Test public void testGetDeployedTaskForm() { // given runtimeService.startProcessInstanceByKey("FormsProcess"); String taskId = taskService.createTaskQuery().singleResult().getId(); // when InputStream deployedTaskForm = formService.getDeployedTaskForm(taskId); // then assertNotNull(deployedTaskForm); String fileAsString = IoUtil.fileAsString("org/camunda/bpm/engine/test/api/form/task.form"); String deployedStartFormAsString = IoUtil.inputStreamAsString(deployedTaskForm); assertEquals(deployedStartFormAsString, fileAsString); }
Example 4
Source File: FormServiceTest.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/DeployedFormsCase.cmmn11.xml", "org/camunda/bpm/engine/test/api/form/task.form" }) @Test public void testGetDeployedTaskForm_Case() { // given caseService.createCaseInstanceByKey("Case_1"); String taskId = taskService.createTaskQuery().singleResult().getId(); // when InputStream deployedTaskForm = formService.getDeployedTaskForm(taskId); // then assertNotNull(deployedTaskForm); String fileAsString = IoUtil.fileAsString("org/camunda/bpm/engine/test/api/form/task.form"); String deployedStartFormAsString = IoUtil.inputStreamAsString(deployedTaskForm); assertEquals(deployedStartFormAsString, fileAsString); }
Example 5
Source File: FormServiceTest.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/EmbeddedDeployedFormsProcess.bpmn20.xml", "org/camunda/bpm/engine/test/api/form/start.form", "org/camunda/bpm/engine/test/api/form/task.form" }) @Test public void testGetEmbeddedDeployedTaskForm() { // given runtimeService.startProcessInstanceByKey("FormsProcess"); String taskId = taskService.createTaskQuery().singleResult().getId(); // when InputStream deployedTaskForm = formService.getDeployedTaskForm(taskId); // then assertNotNull(deployedTaskForm); String fileAsString = IoUtil.fileAsString("org/camunda/bpm/engine/test/api/form/task.form"); String deployedStartFormAsString = IoUtil.inputStreamAsString(deployedTaskForm); assertEquals(deployedStartFormAsString, fileAsString); }