diff options
Diffstat (limited to 'eaaf_core/src/test/java')
-rw-r--r-- | eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java index 6b59925e..78fdde61 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java @@ -33,6 +33,7 @@ import static org.junit.Assert.assertEquals; import java.io.IOException; import java.io.InputStream; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -102,6 +103,20 @@ public class ProcessEngineTest { } @Test + public void wrongProcessDefinition() throws IOException { + try (InputStream in = ProcessEngineTest.class.getResourceAsStream("/process/test/SampleProcessDefinition3.xml")) { + try { + ((ProcessEngineImpl) pe).registerProcessDefinition(in); + Assert.fail(); + + } catch (ProcessDefinitionParserException e) { + Assert.assertTrue(e.getMessage().contains("Post-validation find an error in process definition")); + } + } + + } + + @Test public void testSampleProcess1() throws IOException, ProcessDefinitionParserException, ProcessExecutionException { TestRequestImpl testReq = new TestRequestImpl(); |