Java Code Examples for org.camunda.bpm.engine.impl.util.IoUtil#readClasspathResourceAsString()

The following examples show how to use org.camunda.bpm.engine.impl.util.IoUtil#readClasspathResourceAsString() . 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: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testRenderStartForm() {

  ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();

  String renderedForm = (String) formService.getRenderedStartForm(processDefinition.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testRenderStartForm.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 2
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testRenderEnumField() {

  runtimeService.startProcessInstanceByKey("HtmlFormEngineTest.testRenderEnumField");

  Task t = taskService.createTaskQuery()
    .singleResult();

  String renderedForm = (String) formService.getRenderedTaskForm(t.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testRenderEnumField.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 3
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testRenderTaskForm() {

  runtimeService.startProcessInstanceByKey("HtmlFormEngineTest.testRenderTaskForm");

  Task t = taskService.createTaskQuery()
    .singleResult();

  String renderedForm = (String) formService.getRenderedTaskForm(t.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testRenderTaskForm.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 4
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testRenderDateField() {

  ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
  String renderedForm = (String) formService.getRenderedStartForm(processDefinition.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testRenderDateField.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 5
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testRenderDateFieldWithPattern() {

  ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
  String renderedForm = (String) formService.getRenderedStartForm(processDefinition.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testRenderDateFieldWithPattern.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 6
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testLegacyFormPropertySupport() {

  runtimeService.startProcessInstanceByKey("HtmlFormEngineTest.testLegacyFormPropertySupport");

  Task t = taskService.createTaskQuery()
    .singleResult();

  String renderedForm = (String) formService.getRenderedTaskForm(t.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testLegacyFormPropertySupport.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 7
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testLegacyFormPropertySupportReadOnly() {

  runtimeService.startProcessInstanceByKey("HtmlFormEngineTest.testLegacyFormPropertySupportReadOnly");

  Task t = taskService.createTaskQuery()
    .singleResult();

  String renderedForm = (String) formService.getRenderedTaskForm(t.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testLegacyFormPropertySupportReadOnly.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 8
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testLegacyFormPropertySupportRequired() {

  runtimeService.startProcessInstanceByKey("HtmlFormEngineTest.testLegacyFormPropertySupportRequired");

  Task t = taskService.createTaskQuery()
    .singleResult();

  String renderedForm = (String) formService.getRenderedTaskForm(t.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testLegacyFormPropertySupportRequired.html");

  assertHtmlEquals(expectedForm, renderedForm);

}
 
Example 9
Source File: HtmlFormEngineTest.java    From camunda-bpm-platform with Apache License 2.0 3 votes vote down vote up
@Deployment
public void testBusinessKey() {

  ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();

  String renderedForm = (String) formService.getRenderedStartForm(processDefinition.getId());

  String expectedForm = IoUtil.readClasspathResourceAsString("org/camunda/bpm/engine/test/api/form/HtmlFormEngineTest.testBusinessKey.html");

  assertHtmlEquals(expectedForm, renderedForm);

}