tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r392146 [4/4] - in /incubator/tuscany/java/sca: bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/handler/ containers/container.java/src/...
Date Fri, 07 Apr 2006 01:11:38 GMT
Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextTestCase.java
(original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextTestCase.java
Thu Apr  6 18:11:28 2006
@@ -13,15 +13,13 @@
  */
 package org.apache.tuscany.core.system.context;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.EventContext;
+import org.apache.tuscany.core.context.QualifiedName;
 import org.apache.tuscany.core.context.impl.EventContextImpl;
 import org.apache.tuscany.core.mock.MockConfigContext;
 import org.apache.tuscany.core.mock.MockFactory;
@@ -33,6 +31,8 @@
 import org.apache.tuscany.model.assembly.EntryPoint;
 import org.apache.tuscany.model.assembly.Scope;
 
+import java.util.List;
+
 /**
  * Tests the system aggregate context
  * 
@@ -40,7 +40,6 @@
  */
 public class SystemAggregateComponentContextTestCase extends TestCase {
     private SystemAssemblyFactory factory;
-    private List<ContextFactoryBuilder> builders;
     private SystemAggregateContextImpl system;
 
     public void testChildLocate() throws Exception {
@@ -55,7 +54,7 @@
         childContext.registerModelObject(component);
         childContext.registerModelObject(ep);
         childContext.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(system.locateInstance("system.child/TestService1EP"));
+        Assert.assertNotNull(system.getContext("system.child").getInstance(new QualifiedName("./TestService1EP")));
         childContext.fireEvent(EventContext.MODULE_STOP, null);
     }
 
@@ -66,7 +65,7 @@
         system.registerModelObject(ep);
         system.start();
         system.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertSame(system.locateInstance("TestService1EP"), system.resolveInstance(ModuleScopeSystemComponent.class));
+        Assert.assertSame(system.getContext("TestService1EP").getInstance(null), system.resolveInstance(ModuleScopeSystemComponent.class));
     }
 
     public void testAutowireRegisterAfterStart() throws Exception {
@@ -76,27 +75,27 @@
         system.fireEvent(EventContext.MODULE_START, null);
         EntryPoint ep = MockFactory.createEPSystemBinding("TestService1EP", ModuleScopeSystemComponent.class,
"TestService1", component);
         system.registerModelObject(ep);
-        Assert.assertSame(system.locateInstance("TestService1EP"), system.resolveInstance(ModuleScopeSystemComponent.class));
+        Assert.assertSame(system.getContext("TestService1EP").getInstance(null), system.resolveInstance(ModuleScopeSystemComponent.class));
     }
 
     public void testAutowireModuleRegisterBeforeStart() throws Exception {
         system.registerModelObject(MockFactory.createSystemModule());
         system.start();
         system.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertSame(system.locateInstance("TestService1EP"), system.resolveInstance(ModuleScopeSystemComponent.class));
+        Assert.assertSame(system.getContext("TestService1EP").getInstance(null), system.resolveInstance(ModuleScopeSystemComponent.class));
     }
 
     public void testAutowireModuleRegisterAfterStart() throws Exception {
         system.start();
         system.fireEvent(EventContext.MODULE_START, null);
         system.registerModelObject(MockFactory.createSystemModule());
-        Assert.assertSame(system.locateInstance("TestService1EP"), system.resolveInstance(ModuleScopeSystemComponent.class));
+        Assert.assertSame(system.getContext("TestService1EP").getInstance(null), system.resolveInstance(ModuleScopeSystemComponent.class));
     }
 
     protected void setUp() throws Exception {
         super.setUp();
         factory = new SystemAssemblyFactoryImpl();
-        builders = MockFactory.createSystemBuilders();
+        List<ContextFactoryBuilder> builders = MockFactory.createSystemBuilders();
 
         system = new SystemAggregateContextImpl("system", null, null, new SystemScopeStrategy(),
                 new EventContextImpl(), new MockConfigContext(builders), new NullMonitorFactory(),
null, null);

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateHierarchyTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateHierarchyTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateHierarchyTestCase.java
(original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateHierarchyTestCase.java
Thu Apr  6 18:11:28 2006
@@ -13,10 +13,7 @@
  */
 package org.apache.tuscany.core.system.context;
 
-import java.util.List;
-
 import junit.framework.Assert;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.AbstractAggregateHierarchyTests;
@@ -25,6 +22,8 @@
 import org.apache.tuscany.core.context.scope.DefaultScopeStrategy;
 import org.apache.tuscany.core.mock.MockConfigContext;
 import org.apache.tuscany.core.mock.MockFactory;
+
+import java.util.List;
 
 /**
  * Performs testing of various hierarchical scenarios

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java
(original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java
Thu Apr  6 18:11:28 2006
@@ -18,12 +18,11 @@
 package org.apache.tuscany.core.system.context;
 
 import junit.framework.TestCase;
-
+import org.apache.tuscany.core.config.ConfigurationException;
+import org.apache.tuscany.core.context.EventContext;
+import org.apache.tuscany.core.context.SystemAggregateContext;
 import org.apache.tuscany.core.runtime.RuntimeContext;
 import org.apache.tuscany.core.runtime.RuntimeContextImpl;
-import org.apache.tuscany.core.context.SystemAggregateContext;
-import org.apache.tuscany.core.context.EventContext;
-import org.apache.tuscany.core.config.ConfigurationException;
 
 /**
  * @version $Rev$ $Date$
@@ -35,7 +34,7 @@
     public void testRegistration() throws ConfigurationException {
         MockComponent instance = new MockComponent();
         systemContext.registerJavaObject("foo", MockComponent.class, instance);
-        assertSame(instance, systemContext.locateInstance("foo"));
+        assertSame(instance, systemContext.getContext("foo").getInstance(null));
     }
 
     protected void setUp() throws Exception {



Mime
View raw message