1
2
3
4
5
6
7
8 package net.kwfgrid.gwes;
9
10 import net.kwfgrid.gwes.exception.*;
11 import org.apache.log4j.Logger;
12 import junit.framework.Test;
13 import junit.framework.TestSuite;
14 import junit.framework.Assert;
15
16 import java.io.IOException;
17
18 import net.kwfgrid.gworkflowdl.structure.WorkflowFormatException;
19
20
21
22
23
24
25
26
27
28
29 public final class GWESWorkflowConverterTest extends LocalGWESAbstractTestCase {
30
31 static Logger logger = Logger.getLogger(GWESWorkflowConverterTest.class);
32
33
34
35
36
37
38 public GWESWorkflowConverterTest(String testName) throws LoggingException {
39 super(testName);
40 }
41
42
43
44
45 public static Test suite() {
46 return new TestSuite(GWESWorkflowConverterTest.class);
47 }
48
49
50
51
52 public void testEpnml11ToGWorkflowDL11() throws IOException, NoSuchWorkflowException, WorkflowSecurityException, StateTransitionException, WorkflowFormatException, InterruptedException, DatabaseException, LoggingException, GWESException {
53 String workflow = testGWES("examples/pnml/simple_epnml-1-1.pnml", WorkflowStatus.STATUS_COMPLETED);
54
55 logger.info(workflow);
56
57 String[] data = gwes.getData(workflowID,"pl2", userID);
58 Assert.assertEquals("Number of tokens on place pl2",1,data.length);
59 Assert.assertEquals("Token on place pl2","<control>true</control>",data[0]);
60
61 data = gwes.getData(workflowID,"pl3", userID);
62 Assert.assertEquals("Number of tokens on place pl3",1,data.length);
63 Assert.assertEquals("Token on place pl3","<control>true</control>",data[0]);
64
65 }
66
67
68
69
70
71
72
73 }