From f026711cd4af3326d8e40a428954f822f65e4c80 Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 25 Feb 2010 22:57:23 +0000 Subject: Workaround TUSCANY-3138 to enable the test cases git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@916482 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/itest/interfaces/InterfacesTestCase.java | 11 +++++++---- .../sca/itest/interfaces/InvalidRemoteAttributeTestCase.java | 7 +++++-- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache') diff --git a/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java index 31e40d59c5..27266ffffd 100644 --- a/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java +++ b/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java @@ -22,22 +22,25 @@ package org.apache.tuscany.sca.itest.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; +import java.io.File; + import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; -@Ignore("TUSCANY-3138") +// @Ignore("TUSCANY-3138") public class InterfacesTestCase { + private static final String PKG = "org/apache/tuscany/sca/itest/interfaces/valid"; + private static String ROOT = new File("target/classes/" + PKG).toURI().toString(); + private static Node node; @BeforeClass public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("InterfacesTest.composite"); + String location = ROOT; node = NodeFactory.newInstance().createNode("InterfacesTest.composite", new Contribution("c1", location)); node.start(); } diff --git a/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java b/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java index b1d4dba07d..5aa8be2f04 100644 --- a/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java +++ b/sca-java-2.x/trunk/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java @@ -19,21 +19,24 @@ package org.apache.tuscany.sca.itest.interfaces; +import java.io.File; + import org.apache.tuscany.sca.interfacedef.InvalidAnnotationException; import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; import org.junit.Test; public class InvalidRemoteAttributeTestCase { + private static final String PKG = "org/apache/tuscany/sca/itest/interfaces/invalid"; + private static String ROOT = new File("target/classes/" + PKG).toURI().toString(); @Test public void testInvalidRemoteAttribute() throws Exception { Node node = null; try { - String location = ContributionLocationHelper.getContributionLocation("InvalidRemoteAttribute.composite"); + String location = ROOT; node = NodeFactory.newInstance().createNode("InvalidRemoteAttribute.composite", new Contribution("c1", location)); node.start(); } catch (Exception e) { -- cgit v1.2.3