summaryrefslogtreecommitdiff
path: root/eaaf_core/src/test/java
diff options
context:
space:
mode:
authorThomas <thomas.lenz@egiz.gv.at>2019-10-18 10:51:32 +0200
committerThomas <thomas.lenz@egiz.gv.at>2019-10-18 10:51:32 +0200
commit36c937aec7cb71a4520078d5c2337ce5ff4b2292 (patch)
tree2deff63d65dc5d9c4a1c9bc4f7efaceeafddb91e /eaaf_core/src/test/java
parentef6b8445fd344501bc767c4d73d3ce9de4a8b9ee (diff)
downloadEAAF-Components-36c937aec7cb71a4520078d5c2337ce5ff4b2292.tar.gz
EAAF-Components-36c937aec7cb71a4520078d5c2337ce5ff4b2292.tar.bz2
EAAF-Components-36c937aec7cb71a4520078d5c2337ce5ff4b2292.zip
add jUnit test for process-definition post-validation
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.java15
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();