diff options
| author | Thomas <thomas.lenz@egiz.gv.at> | 2019-10-18 10:51:32 +0200 | 
|---|---|---|
| committer | Thomas <thomas.lenz@egiz.gv.at> | 2019-10-18 10:51:32 +0200 | 
| commit | 36c937aec7cb71a4520078d5c2337ce5ff4b2292 (patch) | |
| tree | 2deff63d65dc5d9c4a1c9bc4f7efaceeafddb91e /eaaf_core/src/test/java | |
| parent | ef6b8445fd344501bc767c4d73d3ce9de4a8b9ee (diff) | |
| download | EAAF-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.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(); | 
