diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-19 03:27:50 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-19 03:27:50 +0000 |
commit | eab31f88e10a97c863c14eb9c18e9fe7e0ed096c (patch) | |
tree | 182f006b80d2aded574f367a0a0b65db41250c78 /sca-java-2.x/trunk/modules/node-impl/src/test/java | |
parent | 5cf2cf2306522c7bd3b420e7ce6e362ce3b743f1 (diff) |
Start to add the support to load node factory configuration from external files
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@911689 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl/src/test/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index f0e6675e8d..56b13b78bb 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -25,12 +25,15 @@ import java.io.File; import java.io.StringReader; import java.net.MalformedURLException; import java.net.URI; +import java.net.URL; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint; +import org.apache.tuscany.sca.extensibility.ServiceDeclarationParser; import org.apache.tuscany.sca.node.Contribution; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; @@ -141,4 +144,13 @@ public class NodeImplTestCase { Assert.assertEquals(1, mapping.size()); Assert.assertEquals("multicast://200.0.0.100:50000/MyDomain", mapping.get("urn:MyDomain")); } + + @Test + public void testLoadNodeFactoryProperties() throws Exception { + URL url = getClass().getResource("/org/apache/tuscany/sca/node/configuration/test-node-factory.config"); + Collection<Map<String, String>> items = ServiceDeclarationParser.load(url, false); + for (Map<String, String> attrs : items) { + System.out.println(attrs); + } + } } |