summaryrefslogtreecommitdiffstats
path: root/otest/newlayout/tuscany-test-runner/src/test
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-03-04 11:09:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-03-04 11:09:46 +0000
commitd578bafee5f79bc0798190bf374edb7825fa9cd1 (patch)
tree0fd0c55f5925291abd058b29effc5c8ec322a388 /otest/newlayout/tuscany-test-runner/src/test
parent1e415299a5037f9f3bf3d61aa7dedb457628261a (diff)
Fix tuscany runtime bridge to match recent OASIS changes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@918935 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'otest/newlayout/tuscany-test-runner/src/test')
-rw-r--r--otest/newlayout/tuscany-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java29
1 files changed, 7 insertions, 22 deletions
diff --git a/otest/newlayout/tuscany-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/otest/newlayout/tuscany-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
index 78bc4a1399..3e0b6380f5 100644
--- a/otest/newlayout/tuscany-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
+++ b/otest/newlayout/tuscany-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
@@ -46,8 +46,6 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
protected NodeFactory launcher;
protected Node node;
protected Properties expectedErrorMessages;
-
- TestConfiguration testConfiguration = null;
public TuscanyRuntimeBridge() {
// read test error mapping
@@ -60,26 +58,18 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
}
}
- public TestConfiguration getTestConfiguration() {
- return testConfiguration;
- }
-
- public void setTestConfiguration(TestConfiguration testConfiguration) {
- this.testConfiguration = testConfiguration;
- }
-
- public boolean startContribution(String contributionLocation, String[] contributionNames) throws Exception {
+ public boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception {
try {
// Tuscany specific code which starts the contribution(s) holding the test
launcher = NodeFactory.newInstance();
Contribution[] contributions = new Contribution[contributionNames.length];
- String[] contributionURIs = getContributionURIs(contributionLocation);
+ String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames);
for (int i = 0; i < contributions.length; i++) {
contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]);
} // end for
- node = launcher.createNode(testConfiguration.getComposite(), contributions);
+ node = launcher.createNode(compositeName, contributions);
// Start the node
node.start();
@@ -102,14 +92,13 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
* the contribution
* @return the contribution locations as an array of Strings
*/
- protected String[] getContributionURIs(String contributionLocation) throws Exception {
- String[] locations;
- locations = testConfiguration.getContributionNames();
+ protected String[] getContributionURIs(String contributionLocation, String[] contributionNames) throws Exception {
+ String[] locations = new String[contributionNames.length];
if (locations != null && contributionLocation != null) {
for (int i = 0; i < locations.length; i++) {
- String aLocation = contributionLocation.replaceAll("%1", locations[i]);
+ String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]);
locations[i] = aLocation;
} // end for
@@ -134,10 +123,6 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
launcher.destroy();
} // end if
} // end method stopContribution
-
- public String getContributionLocation(Class<?> testClass) {
- return ContributionLocationHelper.getContributionLocation(testConfiguration.getTestClass());
- } // end method getContributionLocation
public void checkError(String testName, Throwable ex) throws Throwable {
@@ -161,7 +146,7 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
}
// Deal with the case where the message has variable parts within it
- // marked with the characters ***. Here we tokenize the epected string
+ // marked with the characters ***. Here we tokenize the expected string
// and make sure all the individual parts are present in the results string
String expectedMessageParts[] = expectedMessage.split("\\*\\*\\*");