|
a/src/test/java/net/timbusproject/extractors/test/ArchiUtilsTest.java |
|
b/src/test/java/net/timbusproject/extractors/test/ArchiUtilsTest.java |
|
... |
|
... |
4 |
import static org.junit.Assert.assertNotNull;
|
4 |
import static org.junit.Assert.assertNotNull;
|
5 |
import static org.junit.Assert.assertTrue;
|
5 |
import static org.junit.Assert.assertTrue;
|
6 |
|
6 |
|
7 |
import java.io.File;
|
7 |
import java.io.File;
|
8 |
import java.io.IOException;
|
8 |
import java.io.IOException;
|
|
|
9 |
import java.nio.file.Paths;
|
9 |
import java.util.ArrayList;
|
10 |
import java.util.ArrayList;
|
10 |
import java.util.List;
|
11 |
import java.util.List;
|
11 |
|
12 |
|
12 |
import net.sf.taverna.t2.commandline.exceptions.DatabaseConfigurationException;
|
13 |
import net.sf.taverna.t2.commandline.exceptions.DatabaseConfigurationException;
|
13 |
import net.sf.taverna.t2.commandline.exceptions.InvalidOptionException;
|
14 |
import net.sf.taverna.t2.commandline.exceptions.InvalidOptionException;
|
|
... |
|
... |
56 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
57 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
57 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
58 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
58 |
|
59 |
|
59 |
matchboxExtractor = new TavernaExtractor(true);
|
60 |
matchboxExtractor = new TavernaExtractor(true);
|
60 |
|
61 |
|
61 |
TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
62 |
// TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
62 |
.join("test", "resources", "matchbox.archi"));
|
63 |
// .join("test", "resources", "matchbox.archi"));
|
63 |
TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
64 |
// TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
64 |
.join("test", "resources", "matchbox.t2flow"));
|
65 |
// .join("test", "resources", "matchbox.t2flow"));
|
|
|
66 |
|
|
|
67 |
TavernaExtractor.setArchimateOutputPath(Paths.get("test", "resources", "matchbox.archi"));
|
|
|
68 |
TavernaExtractor.setInputFileName(Paths.get("test", "resources", "matchbox.t2flow"));
|
65 |
|
69 |
|
66 |
matchboxExtractor.process();
|
70 |
matchboxExtractor.process();
|
67 |
ALL_RELATIONS = matchboxExtractor.getRelations();
|
71 |
ALL_RELATIONS = matchboxExtractor.getRelations();
|
68 |
ALL_PROCESSES = matchboxExtractor.getBusinessProcesses();
|
72 |
ALL_PROCESSES = matchboxExtractor.getBusinessProcesses();
|
69 |
ALL_BUSINESSOBJECTS = matchboxExtractor.getBusinessObjects();
|
73 |
ALL_BUSINESSOBJECTS = matchboxExtractor.getBusinessObjects();
|
|
... |
|
... |
73 |
public void test_Looping() throws EditException, OpenDataflowException, InvalidOptionException,
|
77 |
public void test_Looping() throws EditException, OpenDataflowException, InvalidOptionException,
|
74 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
78 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
75 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
79 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
76 |
|
80 |
|
77 |
loopingExtractor = new TavernaExtractor(true);
|
81 |
loopingExtractor = new TavernaExtractor(true);
|
78 |
TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
82 |
// TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
79 |
.join("test", "resources", "looping.archimate"));
|
83 |
// .join("test", "resources", "looping.archimate"));
|
80 |
TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
84 |
// TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
81 |
.join("test", "resources", "looping.t2flow"));
|
85 |
// .join("test", "resources", "looping.t2flow"));
|
|
|
86 |
|
|
|
87 |
TavernaExtractor.setArchimateOutputPath(Paths.get("test", "resources", "looping.archimate"));
|
|
|
88 |
TavernaExtractor.setInputFileName(Paths.get("test", "resources", "looping.t2flow"));
|
82 |
|
89 |
|
83 |
loopingExtractor.process();
|
90 |
loopingExtractor.process();
|
84 |
}
|
91 |
}
|
85 |
|
92 |
|
86 |
@Test
|
93 |
@Test
|
87 |
public void test_processWSDLActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
94 |
public void test_processWSDLActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
88 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
95 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
89 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
96 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
90 |
|
97 |
|
91 |
wsdlActivityExtractor = new TavernaExtractor(true);
|
98 |
wsdlActivityExtractor = new TavernaExtractor(true);
|
92 |
TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
99 |
// TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
93 |
.join("test", "resources", "WSDLActivity.archimate"));
|
100 |
// .join("test", "resources", "WSDLActivity.archimate"));
|
94 |
TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
101 |
// TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
95 |
.join("test", "resources", "WSDLActivity.t2flow"));
|
102 |
// .join("test", "resources", "WSDLActivity.t2flow"));
|
|
|
103 |
|
|
|
104 |
TavernaExtractor.setArchimateOutputPath(Paths.get("test", "resources", "WSDLActivity.archimate"));
|
|
|
105 |
TavernaExtractor.setInputFileName(Paths.get("test", "resources", "WSDLActivity.t2flow"));
|
96 |
|
106 |
|
97 |
wsdlActivityExtractor.process();
|
107 |
wsdlActivityExtractor.process();
|
98 |
}
|
108 |
}
|
99 |
|
109 |
|
100 |
@Test
|
110 |
@Test
|
101 |
public void test_processLocalToolActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
111 |
public void test_processLocalToolActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
102 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
112 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
103 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
113 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
104 |
|
114 |
|
105 |
wsdlActivityExtractor = new TavernaExtractor(true);
|
115 |
wsdlActivityExtractor = new TavernaExtractor(true);
|
106 |
TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
116 |
// TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
107 |
.join("test", "resources", "localTool.archimate"));
|
117 |
// .join("test", "resources", "localTool.archimate"));
|
108 |
TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
118 |
// TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
109 |
.join("test", "resources", "localTool.t2flow"));
|
119 |
// .join("test", "resources", "localTool.t2flow"));
|
|
|
120 |
|
|
|
121 |
TavernaExtractor.setArchimateOutputPath(Paths.get("test", "resources", "localTool.archimate"));
|
|
|
122 |
TavernaExtractor.setInputFileName(Paths.get("test", "resources", "localTool.t2flow"));
|
110 |
|
123 |
|
111 |
wsdlActivityExtractor.process();
|
124 |
wsdlActivityExtractor.process();
|
112 |
}
|
125 |
}
|
113 |
|
126 |
|
114 |
@Test
|
127 |
@Test
|
115 |
public void test_processSSHToolActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
128 |
public void test_processSSHToolActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
116 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
129 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
117 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
130 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
118 |
|
131 |
|
119 |
wsdlActivityExtractor = new TavernaExtractor(true);
|
132 |
wsdlActivityExtractor = new TavernaExtractor(true);
|
120 |
TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
133 |
// TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
121 |
.join("test", "resources", "sshTool.archimate"));
|
134 |
// .join("test", "resources", "sshTool.archimate"));
|
122 |
TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
135 |
// TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
123 |
.join("test", "resources", "sshTool.t2flow"));
|
136 |
// .join("test", "resources", "sshTool.t2flow"));
|
|
|
137 |
|
|
|
138 |
TavernaExtractor.setArchimateOutputPath(Paths.get("test", "resources", "sshTool.archimate"));
|
|
|
139 |
TavernaExtractor.setInputFileName(Paths.get("test", "resources", "sshTool.t2flow"));
|
124 |
|
140 |
|
125 |
wsdlActivityExtractor.process();
|
141 |
wsdlActivityExtractor.process();
|
126 |
}
|
142 |
}
|
127 |
|
143 |
|
128 |
@Test
|
144 |
@Test
|
|
... |
|
... |
130 |
public void test_processBeanshellActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
146 |
public void test_processBeanshellActivity() throws EditException, OpenDataflowException, InvalidOptionException,
|
131 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
147 |
InvalidDataflowException, TokenOrderException, ReadInputException, DatabaseConfigurationException,
|
132 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
148 |
CMException, IOException, DeserializationException, IterationTypeMismatchException {
|
133 |
|
149 |
|
134 |
beanshellActivityExtractor = new TavernaExtractor(true);
|
150 |
beanshellActivityExtractor = new TavernaExtractor(true);
|
135 |
TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
151 |
// TavernaExtractor.setArchimateOutputPath(Joiner.on(File.separator).skipNulls()
|
136 |
.join("test", "resources", "beanshellLActivity.archimate"));
|
152 |
// .join("test", "resources", "beanshellLActivity.archimate"));
|
137 |
TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
153 |
// TavernaExtractor.setInputFileName(Joiner.on(File.separator).skipNulls()
|
138 |
.join("test", "resources", "beanshellLActivity.t2flow"));
|
154 |
// .join("test", "resources", "beanshellLActivity.t2flow"));
|
|
|
155 |
|
|
|
156 |
TavernaExtractor.setArchimateOutputPath(Paths.get("test", "resources", "beanshellLActivity.archimate"));
|
|
|
157 |
TavernaExtractor.setInputFileName(Paths.get("test", "resources", "beanshellLActivity.t2flow"));
|
139 |
|
158 |
|
140 |
beanshellActivityExtractor.process();
|
159 |
beanshellActivityExtractor.process();
|
141 |
}
|
160 |
}
|
142 |
|
161 |
|
143 |
@Test
|
162 |
@Test
|