tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r941246 - in /tuscany/sca-java-2.x/trunk/modules/node-impl/src/test: java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java resources/test.properties
Date Wed, 05 May 2010 11:10:45 GMT
Author: antelder
Date: Wed May  5 11:10:45 2010
New Revision: 941246

URL: http://svn.apache.org/viewvc?rev=941246&view=rev
Log:
Update testcase to test default scheme

Modified:
    tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
    tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties

Modified: tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java?rev=941246&r1=941245&r2=941246&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
Wed May  5 11:10:45 2010
@@ -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"));

Modified: tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties?rev=941246&r1=941245&r2=941246&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/resources/test.properties Wed May
 5 11:10:45 2010
@@ -1,2 +1,4 @@
+defaultScheme = vm
 foo.bla = xyz
 
+



Mime
View raw message