summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-10 21:34:37 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-10 21:34:37 +0000
commit267c37371ae406d89c59fe039d45a13f09472047 (patch)
treee00beaa57c56a476184c94285ddad33ebc604ef4 /branches
parentc6c390ece96a16e76112f84f3f1c43d0421abade (diff)
Make the provider package private
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703578 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-equinox/modules/binding-atom-abdera/pom.xml3
-rw-r--r--branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java27
-rw-r--r--branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java24
3 files changed, 28 insertions, 26 deletions
diff --git a/branches/sca-equinox/modules/binding-atom-abdera/pom.xml b/branches/sca-equinox/modules/binding-atom-abdera/pom.xml
index edb317e4a9..7f95c62c29 100644
--- a/branches/sca-equinox/modules/binding-atom-abdera/pom.xml
+++ b/branches/sca-equinox/modules/binding-atom-abdera/pom.xml
@@ -217,8 +217,7 @@
<Bundle-SymbolicName>org.apache.tuscany.sca.binding.atom.abdera</Bundle-SymbolicName>
<Bundle-Description>${pom.name}</Bundle-Description>
<Export-Package>
- org.apache.tuscany.sca.binding.atom.collection,
- org.apache.tuscany.sca.binding.atom.provider
+ org.apache.tuscany.sca.binding.atom.collection
</Export-Package>
</instructions>
</configuration>
diff --git a/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java b/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
index 9cffe0ae49..4e586a5510 100644
--- a/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
+++ b/branches/sca-equinox/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
@@ -8,7 +8,6 @@ import org.apache.abdera.Abdera;
import org.apache.abdera.model.Content;
import org.apache.abdera.model.Entry;
import org.apache.tuscany.sca.binding.atom.collection.Collection;
-import org.apache.tuscany.sca.node.Client;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
@@ -25,20 +24,22 @@ public class AtomDeleteTestCase {
@BeforeClass
public static void init() throws Exception {
- try{
- System.out.println(">>>AtomDeleteTestCase.init entry");
- String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
- providerNode = NodeFactory.newInstance().createNode(
- "org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
- consumerNode = NodeFactory.newInstance().createNode(
- "org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
- providerNode.start();
- consumerNode.start();
- testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
- abdera = new Abdera();
+ try {
+ System.out.println(">>>AtomDeleteTestCase.init entry");
+ String contribution = ContributionLocationHelper.getContributionLocation(AtomDeleteTestCase.class);
+ providerNode =
+ NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Provider.composite",
+ new Contribution("provider", contribution));
+ consumerNode =
+ NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Consumer.composite",
+ new Contribution("consumer", contribution));
+ providerNode.start();
+ consumerNode.start();
+ testService = consumerNode.getService(CustomerClient.class, "CustomerClient");
+ abdera = new Abdera();
} catch (Exception e) {
e.printStackTrace();
-
+
}
}
diff --git a/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java b/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java
index e0a8ac2c42..1477554cd1 100644
--- a/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java
+++ b/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java
@@ -24,8 +24,6 @@ import java.io.StringReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
-import junit.framework.TestCase;
-
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
@@ -36,11 +34,14 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.DefaultMonitorFactory;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
/**
* @version $Rev$ $Date$
*/
-public class AtomBindingProcessorTestCase extends TestCase {
+public class AtomBindingProcessorTestCase {
private static final String COMPOSITE =
"<?xml version=\"1.0\" encoding=\"ASCII\"?>"
@@ -53,12 +54,12 @@ public class AtomBindingProcessorTestCase extends TestCase {
+ " </component>"
+ "</composite>";
- private XMLInputFactory inputFactory;
- private StAXArtifactProcessor<Object> staxProcessor;
- private Monitor monitor;
+ private static XMLInputFactory inputFactory;
+ private static StAXArtifactProcessor<Object> staxProcessor;
+ private static Monitor monitor;
- @Override
- protected void setUp() throws Exception {
+ @BeforeClass
+ public static void setUp() throws Exception {
DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
inputFactory = XMLInputFactory.newInstance();
// Create a monitor
@@ -76,14 +77,15 @@ public class AtomBindingProcessorTestCase extends TestCase {
* Test parsing valid composite definition. Valid composite populated with correct values expected.
* @throws Exception
*/
+ @Test
public void testLoadValidComposite() throws Exception {
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE));
Composite composite = (Composite)staxProcessor.read(reader);
AtomBinding binding = (AtomBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
- assertNotNull(binding);
- assertEquals("Feed Title", binding.getTitle());
- assertEquals("http://localhost:8080/feed", binding.getURI());
+ Assert.assertNotNull(binding);
+ Assert.assertEquals("Feed Title", binding.getTitle());
+ Assert.assertEquals("http://localhost:8080/feed", binding.getURI());
}
}