diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-21 12:16:29 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-21 12:16:29 +0000 |
commit | 65e3fd65b82c7cd08cfdeee8819f571212b3b1fe (patch) | |
tree | 72142bd4e7fbd9becf3f43d09dde26836562d72f /java/sca/modules/node-impl/src/test | |
parent | 6a9b9b7586fd7a377d57b5ce0117c664beebff25 (diff) |
Simplify the Node API for a common default case so that creating a Node for simple samples and tests can be:
node = NodeFactory.newInstance().createNode();
instead of:
NodeFactory factory = NodeFactory.newInstance();
String root = ContributionLocationHelper.getContributionLocation("Calculator.composite");
Contribution contribution = new Contribution(root, root);
node = factory.createNode("Calculator.composite", contribution);
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@719565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-impl/src/test')
-rw-r--r-- | java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index bd760d613d..0ccbd6d30e 100644 --- a/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -25,7 +25,6 @@ import java.io.File; import junit.framework.Assert; -import org.apache.tuscany.sca.node.Client; import org.apache.tuscany.sca.node.Contribution; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; @@ -63,6 +62,11 @@ public class NodeImplTestCase { testNode(node); } + @Test + public void testDefaultNode() { + testNode(new NodeFactoryImpl().createNode()); + } + private void testNode(Node node) { node.start(); HelloWorld hw = node.getService(HelloWorld.class, "HelloWorld"); |