diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-05 11:10:45 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-05 11:10:45 +0000 |
commit | 643632211aed7072ab68a42e2dfc823f6138f742 (patch) | |
tree | c6fb14ecc3c352bb993bd86a6eb2fe8c499f4c71 | |
parent | 6912fb8627220570e7399ca727b4b2b416c4d3a0 (diff) |
Update testcase to test default scheme
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@941246 13f79535-47bb-0310-9956-ffa450edef68
2 files changed, 8 insertions, 4 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 cb62a76fcc..a8ab78c829 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 @@ -159,26 +159,28 @@ public class NodeImplTestCase { Assert.assertEquals("vm", ps.getProperty("defaultScheme")); Properties properties = new Properties(); + properties.setProperty("defaultScheme", "vm"); properties.setProperty("foo.bla", "some value"); factory = (NodeFactoryImpl)NodeFactory.newInstance(properties); factory.init(); utilities = factory.getExtensionPointRegistry().getExtensionPoint(UtilityExtensionPoint.class); ps = utilities.getUtility(RuntimeProperties.class).getProperties(); - Assert.assertEquals(1, ps.size()); + Assert.assertEquals(2, ps.size()); Assert.assertEquals("some value", ps.getProperty("foo.bla")); factory = (NodeFactoryImpl)NodeFactory.newInstance("properties:test.properties"); factory.init(); utilities = factory.getExtensionPointRegistry().getExtensionPoint(UtilityExtensionPoint.class); ps = utilities.getUtility(RuntimeProperties.class).getProperties(); - Assert.assertEquals(1, ps.size()); + Assert.assertEquals(2, ps.size()); Assert.assertEquals("xyz", ps.getProperty("foo.bla")); - factory = (NodeFactoryImpl)NodeFactory.newInstance("uri:foo?k1=v1&k2=v2"); + factory = (NodeFactoryImpl)NodeFactory.newInstance("uri:foo?k1=v1&k2=v2&defaultScheme=vm"); factory.init(); utilities = factory.getExtensionPointRegistry().getExtensionPoint(UtilityExtensionPoint.class); ps = utilities.getUtility(RuntimeProperties.class).getProperties(); - Assert.assertEquals(3, ps.size()); + Assert.assertEquals(4, ps.size()); + Assert.assertEquals("vm", ps.getProperty("defaultScheme")); Assert.assertEquals("foo", ps.getProperty("defaultDomainName")); Assert.assertEquals("v1", ps.getProperty("k1")); Assert.assertEquals("v2", ps.getProperty("k2")); diff --git a/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties b/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties index ab07d2c8cf..e60546f9b3 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties +++ b/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties @@ -1,2 +1,4 @@ +defaultScheme = vm
foo.bla = xyz
+
|