incubator-composer-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r614266 [3/4] - in /incubator/composer/trunk/composer-core/src: main/java/org/apache/composer/core/ main/java/org/apache/composer/core/containers/ main/java/org/apache/composer/core/visitors/ test/java/org/apache/composer/core/ test/java/or...
Date Tue, 22 Jan 2008 17:25:25 GMT
Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0191TestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0191TestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0191TestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0191TestCase.java Tue Jan 22 09:25:16 2008
@@ -33,12 +33,12 @@
     */
     @Test public void testTheBug()
     {
-        MutableContainer pico = new DefaultContainer( ) ;
-        pico.addComponent(Shark.class);
-        pico.addComponent(Cod.class);
+        MutableContainer container = new DefaultContainer( ) ;
+        container.addComponent(Shark.class);
+        container.addComponent(Cod.class);
         try {
-            pico.addComponent(Bowl.class);
-            Bowl bowl = pico.getComponent(Bowl.class);
+            container.addComponent(Bowl.class);
+            Bowl bowl = container.getComponent(Bowl.class);
             fail("Should have barfed here with UnsatisfiableDependenciesException");
             Fish[] fishes = bowl.getFishes( ) ;
             for( int i = 0 ; i < fishes.length ; i++ )

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0196TestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0196TestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0196TestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0196TestCase.java Tue Jan 22 09:25:16 2008
@@ -38,14 +38,14 @@
     }
 
     @Test public void testShouldAllowRegistrationOfArrayAsInstance() {
-        MutableContainer pico = new DefaultContainer();
+        MutableContainer container = new DefaultContainer();
 
         Descriptor.DescriptorData[] datas = new Descriptor.DescriptorData[3];
 
-        pico.addComponent(datas);
-        pico.addComponent(DescriptorDep.class);
+        container.addComponent(datas);
+        container.addComponent(DescriptorDep.class);
 
-        DescriptorDep descriptorDep = pico.getComponent(DescriptorDep.class);
+        DescriptorDep descriptorDep = container.getComponent(DescriptorDep.class);
 
         assertNotNull(descriptorDep);
     }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0265TestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0265TestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0265TestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0265TestCase.java Tue Jan 22 09:25:16 2008
@@ -45,8 +45,8 @@
         final Method stop = Startable.class.getMethod("stop");
         final ComponentMonitor monitor1 = mockery.mock(ComponentMonitor.class, "Monitor1");
         final ComponentMonitor monitor2 = mockery.mock(ComponentMonitor.class, "Monitor2");
-        DefaultContainer pico = new DefaultContainer(monitor1);
-        pico.as(Characteristics.CACHE).addComponent(DefaultContainerTestCase.MyStartable.class);
+        DefaultContainer container = new DefaultContainer(monitor1);
+        container.as(Characteristics.CACHE).addComponent(DefaultContainerTestCase.MyStartable.class);
         mockery.checking(new Expectations(){{
             one(monitor1).instantiating(with(any(Container.class)), with(any(ComponentAdapter.class)), with(any(Constructor.class)));
             will(returnValue(DefaultContainerTestCase.MyStartable.class.getConstructor()));
@@ -61,11 +61,11 @@
             one(monitor1).invoked(with(any(Container.class)), with(any(ComponentAdapter.class)), with(equal(stop)),
             		with(any(Object.class)), with(any(Long.class)));        	
         }});
-        pico.start();
-        pico.stop();
-        Startable startable = pico.getComponent(DefaultContainerTestCase.MyStartable.class);
+        container.start();
+        container.stop();
+        Startable startable = container.getComponent(DefaultContainerTestCase.MyStartable.class);
         assertNotNull(startable);
-        pico.changeMonitor(monitor2);
+        container.changeMonitor(monitor2);
         mockery.checking(new Expectations(){{
             one(monitor2).invoking(with(any(Container.class)), with(any(ComponentAdapter.class)), with(equal(start)),
             		with(any(Object.class)));
@@ -76,8 +76,8 @@
             one(monitor2).invoked(with(any(Container.class)), with(any(ComponentAdapter.class)), with(equal(stop)),
             		with(any(Object.class)), with(any(Long.class)));        	
         }});
-        pico.start();
-        pico.stop();
+        container.start();
+        container.stop();
     }
 
 }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0280TestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0280TestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0280TestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0280TestCase.java Tue Jan 22 09:25:16 2008
@@ -25,7 +25,7 @@
 import org.apache.composer.core.CompositionException;
 
 /**
- * Test case for issue http://jira.codehaus.org/browse/PICO-280
+ * Test case for issue PICO-280
  */
 public class Issue0280TestCase {
 

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedFieldInjectorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedFieldInjectorTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedFieldInjectorTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedFieldInjectorTestCase.java Tue Jan 22 09:25:16 2008
@@ -52,32 +52,32 @@
     }
 
     @Test public void testFieldInjection() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new AnnotatedFieldInjector(Helicopter.class, Helicopter.class, null,
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new AnnotatedFieldInjector(Helicopter.class, Helicopter.class, null,
                                                     new NullComponentMonitor(), new NullLifecycleStrategy(), Inject.class, false));
-        pico.addComponent(PogoStick.class, new PogoStick());
-        Helicopter chopper = pico.getComponent(Helicopter.class);
+        container.addComponent(PogoStick.class, new PogoStick());
+        Helicopter chopper = container.getComponent(Helicopter.class);
         assertNotNull(chopper);
         assertNotNull(chopper.pogo);
     }
 
     @Test public void testFieldInjectionWithoutAnnotationDoesNotWork() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new AnnotatedFieldInjector(Helicopter2.class, Helicopter2.class, null,
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new AnnotatedFieldInjector(Helicopter2.class, Helicopter2.class, null,
                                                     new NullComponentMonitor(), new NullLifecycleStrategy(), Inject.class, false));
-        pico.addComponent(PogoStick.class, new PogoStick());
-        Helicopter2 chopper = pico.getComponent(Helicopter2.class);
+        container.addComponent(PogoStick.class, new PogoStick());
+        Helicopter2 chopper = container.getComponent(Helicopter2.class);
         assertNotNull(chopper);
         assertNull(chopper.pogo);
     }
 
     @Test public void testFieldDeosNotHappenWithoutRightInjectorDoesNotWork() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new SetterInjector(Helicopter.class, Helicopter.class, null,
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new SetterInjector(Helicopter.class, Helicopter.class, null,
                                                     new NullComponentMonitor(), new NullLifecycleStrategy(),
                                                     "set", false));
-        pico.addComponent(PogoStick.class, new PogoStick());
-        Helicopter chopper = pico.getComponent(Helicopter.class);
+        container.addComponent(PogoStick.class, new PogoStick());
+        Helicopter chopper = container.getComponent(Helicopter.class);
         assertNotNull(chopper);
         assertNull(chopper.pogo);
     }
@@ -96,11 +96,11 @@
     }
 
     @Test public void testFieldInjectionWithAlternativeInjectionAnnotation() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new AnnotatedFieldInjector(Helicopter3.class, Helicopter3.class, null,
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new AnnotatedFieldInjector(Helicopter3.class, Helicopter3.class, null,
                                                     new NullComponentMonitor(), new NullLifecycleStrategy(), AlternativeInject.class, false));
-        pico.addComponent(PogoStick.class, new PogoStick());
-        Helicopter3 chopper = pico.getComponent(Helicopter3.class);
+        container.addComponent(PogoStick.class, new PogoStick());
+        Helicopter3 chopper = container.getComponent(Helicopter3.class);
         assertNotNull(chopper);
         assertNotNull(chopper.pogo);
     }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectionTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectionTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectionTestCase.java Tue Jan 22 09:25:16 2008
@@ -38,7 +38,7 @@
 	
 	@Before
     public void setUp() throws Exception {
-        picoContainer = new DefaultContainer(createComponentFactory());
+        containerContainer = new DefaultContainer(createComponentFactory());
     }
 
     protected ComponentFactory createComponentFactory() {
@@ -83,17 +83,17 @@
     }
 
     @Test public void testContainerUsesStandardConstructor() {
-        picoContainer.addComponent(Bean.class, NamedBeanWithPossibleDefault.class);
-        picoContainer.addComponent("Tom");
-        NamedBeanWithPossibleDefault bean = (NamedBeanWithPossibleDefault) picoContainer.getComponent(Bean.class);
+        containerContainer.addComponent(Bean.class, NamedBeanWithPossibleDefault.class);
+        containerContainer.addComponent("Tom");
+        NamedBeanWithPossibleDefault bean = (NamedBeanWithPossibleDefault) containerContainer.getComponent(Bean.class);
         assertFalse(bean.getByDefault());
     }
 
     @Test public void testContainerUsesOnlyStandardConstructor() {
-        picoContainer.addComponent(Bean.class, NoBean.class);
-        picoContainer.addComponent("Tom");
+        containerContainer.addComponent(Bean.class, NoBean.class);
+        containerContainer.addComponent("Tom");
         try {
-            picoContainer.getComponent(Bean.class);
+            containerContainer.getComponent(Bean.class);
             fail("Instantiation should have failed.");
         } catch (CompositionException e) {
         }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectorTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectorTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectorTestCase.java Tue Jan 22 09:25:16 2008
@@ -57,22 +57,22 @@
 
     @Test public void testSetterMethodInjectionToContrastWithThatBelow() {
 
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new SetterInjector(SetterBurp.class, SetterBurp.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new SetterInjector(SetterBurp.class, SetterBurp.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                            "set", false));
-        pico.addComponent(Wind.class, new Wind());
-        SetterBurp burp = pico.getComponent(SetterBurp.class);
+        container.addComponent(Wind.class, new Wind());
+        SetterBurp burp = container.getComponent(SetterBurp.class);
         assertNotNull(burp);
         assertNotNull(burp.wind);
     }
 
     @Test public void testNonSetterMethodInjection() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new AnnotatedMethodInjector(AnnotatedBurp.class, AnnotatedBurp.class, Parameter.DEFAULT,
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new AnnotatedMethodInjector(AnnotatedBurp.class, AnnotatedBurp.class, Parameter.DEFAULT,
                                                new NullComponentMonitor(), new NullLifecycleStrategy(),
                                                Inject.class, false));
-        pico.addComponent(Wind.class, new Wind());
-        AnnotatedBurp burp = pico.getComponent(AnnotatedBurp.class);
+        container.addComponent(Wind.class, new Wind());
+        AnnotatedBurp burp = container.getComponent(AnnotatedBurp.class);
         assertNotNull(burp);
         assertNotNull(burp.wind);
     }
@@ -92,12 +92,12 @@
 
     
     @Test public void testNonSetterMethodInjectionWithAlternativeAnnotation() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new AnnotatedMethodInjector(AnotherAnnotatedBurp.class, AnotherAnnotatedBurp.class, Parameter.DEFAULT,
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new AnnotatedMethodInjector(AnotherAnnotatedBurp.class, AnotherAnnotatedBurp.class, Parameter.DEFAULT,
                                                new NullComponentMonitor(), new NullLifecycleStrategy(),
                                                AlternativeInject.class, false));
-        pico.addComponent(Wind.class, new Wind());
-        AnotherAnnotatedBurp burp = pico.getComponent(AnotherAnnotatedBurp.class);
+        container.addComponent(Wind.class, new Wind());
+        AnotherAnnotatedBurp burp = container.getComponent(AnotherAnnotatedBurp.class);
         assertNotNull(burp);
         assertNotNull(burp.wind);
     }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectionTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectionTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectionTestCase.java Tue Jan 22 09:25:16 2008
@@ -38,7 +38,7 @@
 
 	@Before
     public void setUp() throws Exception {
-        picoContainer = new DefaultContainer(createComponentFactory());
+        containerContainer = new DefaultContainer(createComponentFactory());
     }
 
     protected ComponentFactory createComponentFactory() {

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectorTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectorTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectorTestCase.java Tue Jan 22 09:25:16 2008
@@ -64,7 +64,7 @@
         return ConstructorInjector.class;
     }
 
-    protected ComponentAdapter prepDEF_verifyWithoutDependencyWorks(MutableContainer picoContainer) {
+    protected ComponentAdapter prepDEF_verifyWithoutDependencyWorks(MutableContainer containerContainer) {
         return new ConstructorInjector("foo", A.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
@@ -80,8 +80,8 @@
         }
     }
 
-    protected ComponentAdapter prepDEF_verifyDoesNotInstantiate(MutableContainer picoContainer) {
-        picoContainer.addComponent(A.class);
+    protected ComponentAdapter prepDEF_verifyDoesNotInstantiate(MutableContainer containerContainer) {
+        containerContainer.addComponent(A.class);
         return new ConstructorInjector(B.class, B.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
@@ -89,19 +89,19 @@
         return new ConstructorInjector("bar", B.class, new Parameter[] {ComponentParameter.DEFAULT} , new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
-    protected ComponentAdapter prepDEF_isAbleToTakeParameters(MutableContainer picoContainer) {
-        picoContainer.addComponent(SimpleTouchable.class);
+    protected ComponentAdapter prepDEF_isAbleToTakeParameters(MutableContainer containerContainer) {
+        containerContainer.addComponent(SimpleTouchable.class);
         return new ConstructorInjector(
                 NamedDependsOnTouchable.class, NamedDependsOnTouchable.class,
                 new Parameter[] {ComponentParameter.DEFAULT, new ConstantParameter("Name")} , new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
-    protected ComponentAdapter prepSER_isSerializable(MutableContainer picoContainer) {
+    protected ComponentAdapter prepSER_isSerializable(MutableContainer containerContainer) {
         return new ConstructorInjector(SimpleTouchable.class, SimpleTouchable.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
-    protected ComponentAdapter prepSER_isXStreamSerializable(final MutableContainer picoContainer) {
-        return prepSER_isSerializable(picoContainer);
+    protected ComponentAdapter prepSER_isXStreamSerializable(final MutableContainer containerContainer) {
+        return prepSER_isSerializable(containerContainer);
     }
 
     public static class NamedDependsOnTouchable extends DependsOnTouchable {
@@ -110,11 +110,11 @@
         }
     }
 
-    protected ComponentAdapter prepVER_verificationFails(MutableContainer picoContainer) {
+    protected ComponentAdapter prepVER_verificationFails(MutableContainer containerContainer) {
         return new ConstructorInjector(DependsOnTouchable.class, DependsOnTouchable.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
-    protected ComponentAdapter prepINS_createsNewInstances(MutableContainer picoContainer) {
+    protected ComponentAdapter prepINS_createsNewInstances(MutableContainer containerContainer) {
         return new ConstructorInjector(SimpleTouchable.class, SimpleTouchable.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
@@ -124,7 +124,7 @@
         }
     }
 
-    protected ComponentAdapter prepINS_errorIsRethrown(MutableContainer picoContainer) {
+    protected ComponentAdapter prepINS_errorIsRethrown(MutableContainer containerContainer) {
         return new ConstructorInjector(Erroneous.class, Erroneous.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
@@ -134,7 +134,7 @@
         }
     }
 
-    protected ComponentAdapter prepINS_runtimeExceptionIsRethrown(MutableContainer picoContainer) {
+    protected ComponentAdapter prepINS_runtimeExceptionIsRethrown(MutableContainer containerContainer) {
         return new ConstructorInjector(RuntimeThrowing.class, RuntimeThrowing.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
@@ -145,12 +145,12 @@
     }
 
     protected ComponentAdapter prepINS_normalExceptionIsRethrownInsideInitializationException(
-            MutableContainer picoContainer) {
+            MutableContainer containerContainer) {
         return new ConstructorInjector(NormalExceptionThrowing.class, NormalExceptionThrowing.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
-    protected ComponentAdapter prepRES_dependenciesAreResolved(MutableContainer picoContainer) {
-        picoContainer.addComponent(SimpleTouchable.class);
+    protected ComponentAdapter prepRES_dependenciesAreResolved(MutableContainer containerContainer) {
+        containerContainer.addComponent(SimpleTouchable.class);
         return new ConstructorInjector(DependsOnTouchable.class, DependsOnTouchable.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
     }
 
@@ -166,25 +166,25 @@
         }
     }
 
-    protected ComponentAdapter prepRES_failingVerificationWithCyclicDependencyException(MutableContainer picoContainer) {
+    protected ComponentAdapter prepRES_failingVerificationWithCyclicDependencyException(MutableContainer containerContainer) {
         final ComponentAdapter componentAdapter = new ConstructorInjector(C1.class, C1.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
-        picoContainer.addAdapter(componentAdapter);
-        picoContainer.addComponent(C2.class, C2.class);
+        containerContainer.addAdapter(componentAdapter);
+        containerContainer.addComponent(C2.class, C2.class);
         return componentAdapter;
     }
 
-    protected ComponentAdapter prepRES_failingInstantiationWithCyclicDependencyException(MutableContainer picoContainer) {
+    protected ComponentAdapter prepRES_failingInstantiationWithCyclicDependencyException(MutableContainer containerContainer) {
         final ComponentAdapter componentAdapter = new ConstructorInjector(C1.class, C1.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false);
-        picoContainer.addAdapter(componentAdapter);
-        picoContainer.addComponent(C2.class, C2.class);
+        containerContainer.addAdapter(componentAdapter);
+        containerContainer.addComponent(C2.class, C2.class);
         return componentAdapter;
     }
 
     @Test public void testNormalExceptionThrownInCtorIsRethrownInsideInvocationTargetExeption() {
-        DefaultContainer picoContainer = new DefaultContainer();
-        picoContainer.addComponent(NormalExceptionThrowing.class);
+        DefaultContainer containerContainer = new DefaultContainer();
+        containerContainer.addComponent(NormalExceptionThrowing.class);
         try {
-            picoContainer.getComponent(NormalExceptionThrowing.class);
+            containerContainer.getComponent(NormalExceptionThrowing.class);
             fail();
         } catch (CompositionException e) {
             assertEquals("test", e.getCause().getMessage());
@@ -198,10 +198,10 @@
     }
 
     @Test public void testInstantiationExceptionThrownInCtorIsRethrownInsideInvocationTargetExeption() {
-        DefaultContainer picoContainer = new DefaultContainer();
+        DefaultContainer containerContainer = new DefaultContainer();
         try {
-            picoContainer.addComponent(InstantiationExceptionThrowing.class);
-            picoContainer.getComponent(InstantiationExceptionThrowing.class);
+            containerContainer.addComponent(InstantiationExceptionThrowing.class);
+            containerContainer.getComponent(InstantiationExceptionThrowing.class);
             fail();
         } catch (RuntimeException e) {
             assertEquals("Barf", e.getMessage());
@@ -214,10 +214,10 @@
     }
 
     @Test public void testInitializationExceptionThrownBecauseOfFilteredConstructors() {
-        DefaultContainer picoContainer = new DefaultContainer();
+        DefaultContainer containerContainer = new DefaultContainer();
         try {
-            picoContainer.addComponent(AllConstructorsArePrivate.class);
-            picoContainer.getComponent(AllConstructorsArePrivate.class);
+            containerContainer.addComponent(AllConstructorsArePrivate.class);
+            containerContainer.getComponent(AllConstructorsArePrivate.class);
             fail();
         } catch (CompositionException e) {
             String s = e.getMessage();
@@ -227,10 +227,10 @@
     }
 
     @Test public void testRegisterInterfaceShouldFail() throws CompositionException {
-        MutableContainer pico = new DefaultContainer();
+        MutableContainer container = new DefaultContainer();
 
         try {
-            pico.addComponent(Runnable.class);
+            container.addComponent(Runnable.class);
             fail("Shouldn't be allowed to register abstract classes or interfaces.");
         } catch (AbstractInjector.NotConcreteRegistrationException e) {
             assertEquals(Runnable.class, e.getComponentImplementation());
@@ -239,10 +239,10 @@
     }
 
     @Test public void testRegisterAbstractShouldFail() throws CompositionException {
-        MutableContainer pico = new DefaultContainer();
+        MutableContainer container = new DefaultContainer();
 
         try {
-            pico.addComponent(AbstractButton.class);
+            container.addComponent(AbstractButton.class);
             fail("Shouldn't be allowed to register abstract classes or interfaces.");
         } catch (AbstractInjector.NotConcreteRegistrationException e) {
             assertEquals(AbstractButton.class, e.getComponentImplementation());
@@ -270,14 +270,14 @@
         }
     }
 
-    // http://jira.codehaus.org/browse/PICO-201
+    // PICO-201
     @Test public void testShouldNotConsiderNonPublicConstructors() {
-        DefaultContainer pico = new DefaultContainer();
-        pico.addComponent(Component201.class);
-        pico.addComponent(new Integer(2));
-        pico.addComponent(Boolean.TRUE);
-        pico.addComponent("Hello");
-        assertNotNull(pico.getComponent(Component201.class));
+        DefaultContainer container = new DefaultContainer();
+        container.addComponent(Component201.class);
+        container.addComponent(new Integer(2));
+        container.addComponent(Boolean.TRUE);
+        container.addComponent("Hello");
+        assertNotNull(container.getComponent(Component201.class));
     }
 
     @Test public void testMonitoringHappensBeforeAndAfterInstantiation() throws NoSuchMethodException {

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/MethodInjectionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/MethodInjectionTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/MethodInjectionTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/MethodInjectionTestCase.java Tue Jan 22 09:25:16 2008
@@ -43,47 +43,47 @@
     }
 
     @Test public void testMethodInjection() {
-        DefaultContainer pico = new DefaultContainer(new MethodInjection());
-        pico.addComponent("hello");
-        pico.addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        Foo foo = pico.getComponent(Foo.class);
+        DefaultContainer container = new DefaultContainer(new MethodInjection());
+        container.addComponent("hello");
+        container.addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        Foo foo = container.getComponent(Foo.class);
         assertNotNull(foo.bar);
         assertNotNull(foo.string);
-        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testMethodInjectionViaCharacteristics() {
-        DefaultContainer pico = new DefaultContainer();
-        pico.addComponent("hello");
-        pico.as(Characteristics.METHOD_INJECTION).addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        Foo foo = pico.getComponent(Foo.class);
+        DefaultContainer container = new DefaultContainer();
+        container.addComponent("hello");
+        container.as(Characteristics.METHOD_INJECTION).addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        Foo foo = container.getComponent(Foo.class);
         assertNotNull(foo.bar);
         assertNotNull(foo.string);
-        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testMethodInjectionViaAdapter() {
-        DefaultContainer pico = new DefaultContainer(new MethodInjection());
-        pico.addComponent("hello");
-        pico.addAdapter(new MethodInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), "inject", false));
-        pico.addComponent(Bar.class);
-        Foo foo = pico.getComponent(Foo.class);
+        DefaultContainer container = new DefaultContainer(new MethodInjection());
+        container.addComponent("hello");
+        container.addAdapter(new MethodInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), "inject", false));
+        container.addComponent(Bar.class);
+        Foo foo = container.getComponent(Foo.class);
         assertNotNull(foo.bar);
         assertNotNull(foo.string);
-        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testMethodInjectionByBuilder() {
-        MutableContainer pico = new ContainerBuilder().withMethodInjection().build();
-        pico.addComponent("hello");
-        pico.addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        Foo foo = pico.getComponent(Foo.class);
+        MutableContainer container = new ContainerBuilder().withMethodInjection().build();
+        container.addComponent("hello");
+        container.addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        Foo foo = container.getComponent(Foo.class);
         assertNotNull(foo.bar);
         assertNotNull(foo.string);
-        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("MethodInjector-class org.apache.composer.core.injectors.MethodInjectionTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
 }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectionTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectionTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectionTestCase.java Tue Jan 22 09:25:16 2008
@@ -41,7 +41,7 @@
 	
 	@Before
     public void setUp() throws Exception {
-        picoContainer = new DefaultContainer(createComponentFactory());
+        containerContainer = new DefaultContainer(createComponentFactory());
     }
 
     protected ComponentFactory createComponentFactory() {
@@ -86,17 +86,17 @@
     }
 
     @Test public void testContainerUsesStandardConstructor() {
-        picoContainer.addComponent(Bean.class, NamedBeanWithPossibleDefault.class);
-        picoContainer.addComponent("Tom");
-        NamedBeanWithPossibleDefault bean = (NamedBeanWithPossibleDefault) picoContainer.getComponent(Bean.class);
+        containerContainer.addComponent(Bean.class, NamedBeanWithPossibleDefault.class);
+        containerContainer.addComponent("Tom");
+        NamedBeanWithPossibleDefault bean = (NamedBeanWithPossibleDefault) containerContainer.getComponent(Bean.class);
         assertFalse(bean.getByDefault());
     }
 
     @Test public void testContainerUsesOnlyStandardConstructor() {
-        picoContainer.addComponent(Bean.class, NoBean.class);
-        picoContainer.addComponent("Tom");
+        containerContainer.addComponent(Bean.class, NoBean.class);
+        containerContainer.addComponent("Tom");
         try {
-            picoContainer.getComponent(Bean.class);
+            containerContainer.getComponent(Bean.class);
             fail("Instantiation should have failed.");
         } catch (CompositionException e) {
         }
@@ -126,10 +126,10 @@
     }
 
     @Test public void testAlternatePrefixWorks() {
-        picoContainer = new DefaultContainer(new SetterInjection("init"));
-        picoContainer.addComponent(Bean.class, AnotherNamedBean.class);
-        picoContainer.addComponent("Tom");
-        AnotherNamedBean bean = picoContainer.getComponent(AnotherNamedBean.class);
+        containerContainer = new DefaultContainer(new SetterInjection("init"));
+        containerContainer.addComponent(Bean.class, AnotherNamedBean.class);
+        containerContainer.addComponent("Tom");
+        AnotherNamedBean bean = containerContainer.getComponent(AnotherNamedBean.class);
         assertEquals("Tom", bean.getName());
     }
 

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectorTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectorTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectorTestCase.java Tue Jan 22 09:25:16 2008
@@ -58,40 +58,40 @@
         return new Caching().wrap(new SetterInjection());
     }
 
-    protected ComponentAdapter prepDEF_verifyWithoutDependencyWorks(MutableContainer picoContainer) {
+    protected ComponentAdapter prepDEF_verifyWithoutDependencyWorks(MutableContainer containerContainer) {
         return new SetterInjector(PersonBean.class, PersonBean.class, new Parameter[] {new ConstantParameter(
-                "Pico Container")}, new NullComponentMonitor(), new NullLifecycleStrategy(), "set", false);
+                "Container Container")}, new NullComponentMonitor(), new NullLifecycleStrategy(), "set", false);
     }
 
-    protected ComponentAdapter prepDEF_verifyDoesNotInstantiate(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
+    protected ComponentAdapter prepDEF_verifyDoesNotInstantiate(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
         return new SetterInjector(DeadBody.class, DeadBody.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                   "set", false);
     }
 
     protected ComponentAdapter prepDEF_visitable() {
         return new SetterInjector(PersonBean.class, PersonBean.class, new Parameter[] {new ConstantParameter(
-                "Pico Container")}, new NullComponentMonitor(), new NullLifecycleStrategy(), "set", false);
+                "Container Container")}, new NullComponentMonitor(), new NullLifecycleStrategy(), "set", false);
 
     }
 
-    protected ComponentAdapter prepSER_isSerializable(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
+    protected ComponentAdapter prepSER_isSerializable(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
         return new SetterInjector(PersonBean.class, PersonBean.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                   "set", false);
     }
 
-    protected ComponentAdapter prepSER_isXStreamSerializable(MutableContainer picoContainer) {
-        return prepSER_isSerializable(picoContainer);
+    protected ComponentAdapter prepSER_isXStreamSerializable(MutableContainer containerContainer) {
+        return prepSER_isSerializable(containerContainer);
     }
 
-    protected ComponentAdapter prepDEF_isAbleToTakeParameters(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
-        picoContainer.addComponent(PersonBean.class);
+    protected ComponentAdapter prepDEF_isAbleToTakeParameters(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
+        containerContainer.addComponent(PersonBean.class);
         SetterInjector componentAdapter = new SetterInjector(
                 PurseBean.class, MoneyPurse.class, new Parameter[] {DEFAULT, new ConstantParameter(100.0)}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                 "set", false);
-        return picoContainer.as(Characteristics.NO_CACHE).addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
+        return containerContainer.as(Characteristics.NO_CACHE).addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
     }
 
     public static class MoneyPurse
@@ -107,17 +107,17 @@
         }
     }
 
-    protected ComponentAdapter prepVER_verificationFails(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
-        picoContainer.addComponent(PersonBean.class);
+    protected ComponentAdapter prepVER_verificationFails(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
+        containerContainer.addComponent(PersonBean.class);
         SetterInjector componentAdapter = new SetterInjector(
                 PurseBean.class, MoneyPurse.class, new Parameter[] {DEFAULT},new NullComponentMonitor(), new NullLifecycleStrategy(),
                 "set", false);
-        return picoContainer.addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
+        return containerContainer.addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
     }
 
-    protected ComponentAdapter prepINS_createsNewInstances(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
+    protected ComponentAdapter prepINS_createsNewInstances(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
         return new SetterInjector(PersonBean.class, PersonBean.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                   "set", false);
     }
@@ -129,8 +129,8 @@
         }
     }
 
-    protected ComponentAdapter prepINS_errorIsRethrown(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
+    protected ComponentAdapter prepINS_errorIsRethrown(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
         return new SetterInjector(Ghost.class, Ghost.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                   "set", false);
     }
@@ -142,8 +142,8 @@
         }
     }
 
-    protected ComponentAdapter prepINS_runtimeExceptionIsRethrown(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
+    protected ComponentAdapter prepINS_runtimeExceptionIsRethrown(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
         return new SetterInjector(DeadBody.class, DeadBody.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                   "set", false);
     }
@@ -156,16 +156,16 @@
     }
 
     protected ComponentAdapter prepINS_normalExceptionIsRethrownInsideInitializationException(
-            MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
+            MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
         return new SetterInjector(
                 HidingPersion.class, HidingPersion.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                 "set", false);
     }
 
-    protected ComponentAdapter prepRES_dependenciesAreResolved(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
-        picoContainer.addComponent(PersonBean.class);
+    protected ComponentAdapter prepRES_dependenciesAreResolved(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
+        containerContainer.addComponent(PersonBean.class);
         return new SetterInjector(PurseBean.class, PurseBean.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                   "set", false);
     }
@@ -183,22 +183,22 @@
         }
     }
 
-    protected ComponentAdapter prepRES_failingVerificationWithCyclicDependencyException(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
-        picoContainer.addComponent(PersonBean.class, WealthyPerson.class);
+    protected ComponentAdapter prepRES_failingVerificationWithCyclicDependencyException(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
+        containerContainer.addComponent(PersonBean.class, WealthyPerson.class);
         SetterInjector componentAdapter = new SetterInjector(
                 PurseBean.class, PurseBean.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                 "set", false);
-        return picoContainer.as(Characteristics.NO_CACHE).addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
+        return containerContainer.as(Characteristics.NO_CACHE).addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
     }
 
-    protected ComponentAdapter prepRES_failingInstantiationWithCyclicDependencyException(MutableContainer picoContainer) {
-        picoContainer.addComponent("Pico Container");
-        picoContainer.addComponent(PersonBean.class, WealthyPerson.class);
+    protected ComponentAdapter prepRES_failingInstantiationWithCyclicDependencyException(MutableContainer containerContainer) {
+        containerContainer.addComponent("Container Container");
+        containerContainer.addComponent(PersonBean.class, WealthyPerson.class);
         SetterInjector componentAdapter = new SetterInjector(
                 PurseBean.class, PurseBean.class, new Parameter[] {DEFAULT}, new NullComponentMonitor(), new NullLifecycleStrategy(),
                 "set", false);
-        return picoContainer.as(Characteristics.NO_CACHE).addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
+        return containerContainer.as(Characteristics.NO_CACHE).addAdapter(componentAdapter).getComponentAdapter(PurseBean.class, (NameBinding) null);
     }
 
     public static class A {
@@ -271,12 +271,12 @@
         SetterInjector bAdapter = new SetterInjector("b", B.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                                      "set", false);
 
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(bAdapter);
-        pico.addAdapter(aAdapter);
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(bAdapter);
+        container.addAdapter(aAdapter);
 
         try {
-            aAdapter.getComponentInstance(pico);
+            aAdapter.getComponentInstance(container);
         } catch (AbstractInjector.UnsatisfiableDependenciesException e) {
             assertTrue(e.getUnsatisfiableDependencies().contains(List.class));
             assertTrue(e.getUnsatisfiableDependencies().contains(String.class));
@@ -289,17 +289,17 @@
         SetterInjector bAdapter = new SetterInjector("b", B.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                                      "set", false);
 
-        MutableContainer pico = new DefaultContainer();
-        pico.addComponent(List.class, ArrayList.class)
+        MutableContainer container = new DefaultContainer();
+        container.addComponent(List.class, ArrayList.class)
             .addComponent(String.class, "foo")
             .addAdapter(bAdapter)
             .addAdapter(aAdapter);
 
-        aAdapter.getComponentInstance(pico);
+        aAdapter.getComponentInstance(container);
 
         assertNotNull(aAdapter);
 
-        A2 a = pico.getComponent(A2.class);
+        A2 a = container.getComponent(A2.class);
         assertTrue(a.getList() == null);
         assertTrue(a.getString() == null);
     }
@@ -328,35 +328,35 @@
 
     @Test public void testSetterMethodInjectionToContrastWithThatBelow() {
 
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new SetterInjector(SetterBurp.class, SetterBurp.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new SetterInjector(SetterBurp.class, SetterBurp.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                            "set", false));
-        pico.addComponent(Wind.class, new Wind());
-        SetterBurp burp = pico.getComponent(SetterBurp.class);
+        container.addComponent(Wind.class, new Wind());
+        SetterBurp burp = container.getComponent(SetterBurp.class);
         assertNotNull(burp);
         assertNotNull(burp.wind);
     }
 
     @Test public void testNonSetterMethodInjection() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new SetterInjector(InitBurp.class, InitBurp.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new SetterInjector(InitBurp.class, InitBurp.class, Parameter.DEFAULT, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                            "set", false) {
             protected String getInjectorPrefix() {
                 return "init";
             }
         });
-        pico.addComponent(Wind.class, new Wind());
-        InitBurp burp = pico.getComponent(InitBurp.class);
+        container.addComponent(Wind.class, new Wind());
+        InitBurp burp = container.getComponent(InitBurp.class);
         assertNotNull(burp);
         assertNotNull(burp.wind);
     }
 
     @Test public void testNonSetterMethodInjectionWithoutOverridingSetterPrefix() {
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(new SetterInjector(InitBurp.class, InitBurp.class, Parameter.ZERO, new NullComponentMonitor(), new NullLifecycleStrategy(),
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(new SetterInjector(InitBurp.class, InitBurp.class, Parameter.ZERO, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                            "set", false));
-        pico.addComponent(Wind.class, new Wind());
-        InitBurp burp = pico.getComponent(InitBurp.class);
+        container.addComponent(Wind.class, new Wind());
+        InitBurp burp = container.getComponent(InitBurp.class);
         assertNotNull(burp);
         assertTrue(burp.wind == null);
     }
@@ -406,15 +406,15 @@
         SetterInjector cNullAdapter = new SetterInjector("c0", C.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(),
                                                          "set", false);
 
-        MutableContainer pico = new DefaultContainer();
-        pico.addAdapter(bAdapter);
-        pico.addAdapter(cAdapter);
-        pico.addAdapter(cNullAdapter);
-        pico.addComponent(ArrayList.class);
+        MutableContainer container = new DefaultContainer();
+        container.addAdapter(bAdapter);
+        container.addAdapter(cAdapter);
+        container.addAdapter(cNullAdapter);
+        container.addComponent(ArrayList.class);
 
-        C c = (C) cAdapter.getComponentInstance(pico);
+        C c = (C) cAdapter.getComponentInstance(container);
         assertTrue(c.instantiatedAsBean());
-        C c0 = (C) cNullAdapter.getComponentInstance(pico);
+        C c0 = (C) cNullAdapter.getComponentInstance(container);
         assertTrue(c0.instantiatedAsBean());
     }
 
@@ -443,15 +443,14 @@
     }
 
     // TODO PICO-188
-    // http://jira.codehaus.org/browse/PICO-188
     public void FIXME_testShouldBeAbleToHandleMutualDependenciesWithSetterInjection() {
-        MutableContainer pico = new DefaultContainer(new Caching().wrap(new SetterInjection()));
+        MutableContainer container = new DefaultContainer(new Caching().wrap(new SetterInjection()));
 
-        pico.addComponent(Yin.class);
-        pico.addComponent(Yang.class);
+        container.addComponent(Yin.class);
+        container.addComponent(Yang.class);
 
-        Yin yin = pico.getComponent(Yin.class);
-        Yang yang = pico.getComponent(Yang.class);
+        Yin yin = container.getComponent(Yin.class);
+        Yang yang = container.getComponent(Yang.class);
 
         assertSame(yin, yang.getYin());
         assertSame(yang, yin.getYang());

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/monitors/NullComponentMonitorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/monitors/NullComponentMonitorTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/monitors/NullComponentMonitorTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/monitors/NullComponentMonitorTestCase.java Tue Jan 22 09:25:16 2008
@@ -39,24 +39,24 @@
     @Test public void testItAll() throws NoSuchMethodException {
 
         NullComponentMonitor ncm = new NullComponentMonitor();
-        ncm.instantiated(makePico(), makeCA(), makeConstructor(), "foo", new Object[0], 10);
-        assertEquals(makeConstructor(), ncm.instantiating(makePico(), makeCA(), makeConstructor()));
-        ncm.instantiationFailed(makePico(), makeCA(), makeConstructor(), new Exception());
+        ncm.instantiated(makeContainer(), makeCA(), makeConstructor(), "foo", new Object[0], 10);
+        assertEquals(makeConstructor(), ncm.instantiating(makeContainer(), makeCA(), makeConstructor()));
+        ncm.instantiationFailed(makeContainer(), makeCA(), makeConstructor(), new Exception());
         ncm.invocationFailed(makeConstructor(), "foo", new Exception());
-        ncm.invoked(makePico(), makeCA(), makeMethod(), "foo", 10);
-        ncm.invoking(makePico(), makeCA(), makeMethod(), "foo");
+        ncm.invoked(makeContainer(), makeCA(), makeMethod(), "foo", 10);
+        ncm.invoking(makeContainer(), makeCA(), makeMethod(), "foo");
         try {
-            ncm.lifecycleInvocationFailed(makePico(), makeCA(), makeMethod(), "foo", new RuntimeException());
+            ncm.lifecycleInvocationFailed(makeContainer(), makeCA(), makeMethod(), "foo", new RuntimeException());
         } catch (LifecycleException e) {
             assertEquals(makeMethod(), e.getMethod());
             assertEquals("foo", e.getInstance());
             assertEquals("LifecycleException: method 'public java.lang.String java.lang.String.toString()', instance 'foo, java.lang.RuntimeException", e.getMessage());
         }
-        assertNull(ncm.noComponentFound(makePico(), String.class));
+        assertNull(ncm.noComponentFound(makeContainer(), String.class));
 
     }
 
-    private MutableContainer makePico() {
+    private MutableContainer makeContainer() {
         return mockery.mock(MutableContainer.class);
     }
 

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/parameters/ParameterTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/parameters/ParameterTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/parameters/ParameterTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/parameters/ParameterTestCase.java Tue Jan 22 09:25:16 2008
@@ -51,23 +51,23 @@
     final NameBinding pn = new FooNameBinding();
 
     @Test public void testComponentParameterFetches() throws CompositionException {
-        DefaultContainer pico = new DefaultContainer();
-        ComponentAdapter adapter = pico.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
+        DefaultContainer container = new DefaultContainer();
+        ComponentAdapter adapter = container.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
                                                                                                                  (NameBinding) null);
         assertNotNull(adapter);
-        assertNotNull(pico.getComponent(Touchable.class));
-        Touchable touchable = (Touchable) ComponentParameter.DEFAULT.resolveInstance(pico, null, Touchable.class, pn,
+        assertNotNull(container.getComponent(Touchable.class));
+        Touchable touchable = (Touchable) ComponentParameter.DEFAULT.resolveInstance(container, null, Touchable.class, pn,
                                                                                      false, null);
         assertNotNull(touchable);
     }
 
     @Test public void testComponentParameterExcludesSelf() throws CompositionException {
-        DefaultContainer pico = new DefaultContainer();
-        ComponentAdapter adapter = pico.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
+        DefaultContainer container = new DefaultContainer();
+        ComponentAdapter adapter = container.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
                                                                                                                  (NameBinding) null);
 
-        assertNotNull(pico.getComponent(Touchable.class));
-        Touchable touchable = (Touchable) ComponentParameter.DEFAULT.resolveInstance(pico, adapter, Touchable.class, pn,
+        assertNotNull(container.getComponent(Touchable.class));
+        Touchable touchable = (Touchable) ComponentParameter.DEFAULT.resolveInstance(container, adapter, Touchable.class, pn,
                                                                                      false, null);
         assertNull(touchable);
     }
@@ -75,122 +75,122 @@
     @Test public void testConstantParameter() throws CompositionException {
         Object value = new Object();
         ConstantParameter parameter = new ConstantParameter(value);
-        MutableContainer picoContainer = new DefaultContainer();
-        assertSame(value, parameter.resolveInstance(picoContainer, null, Object.class, pn, false, null));
+        MutableContainer containerContainer = new DefaultContainer();
+        assertSame(value, parameter.resolveInstance(containerContainer, null, Object.class, pn, false, null));
     }
 
     @Test public void testDependsOnTouchableWithTouchableSpecifiedAsConstant() throws CompositionException {
-        DefaultContainer pico = new DefaultContainer();
+        DefaultContainer container = new DefaultContainer();
         SimpleTouchable touchable = new SimpleTouchable();
-        pico.addComponent(DependsOnTouchable.class, DependsOnTouchable.class, new ConstantParameter(touchable));
-        pico.getComponents();
+        container.addComponent(DependsOnTouchable.class, DependsOnTouchable.class, new ConstantParameter(touchable));
+        container.getComponents();
         assertTrue(touchable.wasTouched);
     }
 
     @Test public void testComponentParameterRespectsExpectedType() {
-        MutableContainer picoContainer = new DefaultContainer();
-        ComponentAdapter adapter = picoContainer.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
+        MutableContainer containerContainer = new DefaultContainer();
+        ComponentAdapter adapter = containerContainer.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
                                                                                                                           (NameBinding) null);
-        assertNull(ComponentParameter.DEFAULT.resolveInstance(picoContainer, adapter, TestCase.class, pn, false, null));
+        assertNull(ComponentParameter.DEFAULT.resolveInstance(containerContainer, adapter, TestCase.class, pn, false, null));
     }
 	
 	@Test public void testComponentParameterResolvesPrimitiveType() {
-        MutableContainer picoContainer = new DefaultContainer();
-        ComponentAdapter adapter = picoContainer.addComponent("glarch", 239).getComponentAdapter("glarch");
+        MutableContainer containerContainer = new DefaultContainer();
+        ComponentAdapter adapter = containerContainer.addComponent("glarch", 239).getComponentAdapter("glarch");
         assertNotNull(adapter);
 		Parameter parameter = new ComponentParameter("glarch");
-		assertNotNull(parameter.resolveInstance(picoContainer,null,Integer.TYPE, pn, false, null));
-		assertEquals(239, ((Integer)parameter.resolveInstance(picoContainer,null,Integer.TYPE, pn, false, null)).intValue());
+		assertNotNull(parameter.resolveInstance(containerContainer,null,Integer.TYPE, pn, false, null));
+		assertEquals(239, ((Integer)parameter.resolveInstance(containerContainer,null,Integer.TYPE, pn, false, null)).intValue());
 	}
 
     @Test public void testConstantParameterRespectsExpectedType() {
-        MutableContainer picoContainer = new DefaultContainer();
+        MutableContainer containerContainer = new DefaultContainer();
         Parameter parameter = new ConstantParameter(new SimpleTouchable());
-        ComponentAdapter adapter = picoContainer.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
+        ComponentAdapter adapter = containerContainer.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
                                                                                                                           (NameBinding) null);
-        assertFalse(parameter.isResolvable(picoContainer, adapter, TestCase.class, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, adapter, TestCase.class, pn, false, null));
     }
 
     @Test public void testParameterRespectsExpectedType() throws CompositionException {
         Parameter parameter = new ConstantParameter(Touchable.class);
-        MutableContainer picoContainer = new DefaultContainer();
-        assertFalse(parameter.isResolvable(picoContainer, null, TestCase.class, pn, false, null));
+        MutableContainer containerContainer = new DefaultContainer();
+        assertFalse(parameter.isResolvable(containerContainer, null, TestCase.class, pn, false, null));
 
-        ComponentAdapter adapter = picoContainer.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
+        ComponentAdapter adapter = containerContainer.addComponent(Touchable.class, SimpleTouchable.class).getComponentAdapter(Touchable.class,
                                                                                                                           (NameBinding) null);
 
-        assertNull(ComponentParameter.DEFAULT.resolveInstance(picoContainer, adapter, TestCase.class, pn, false, null));
+        assertNull(ComponentParameter.DEFAULT.resolveInstance(containerContainer, adapter, TestCase.class, pn, false, null));
     }
 
     @Test public void testConstantParameterWithPrimitives() throws CompositionException {
-        MutableContainer picoContainer = new DefaultContainer();
+        MutableContainer containerContainer = new DefaultContainer();
         Byte byteValue = (byte)5;
         ConstantParameter parameter = new ConstantParameter(byteValue);
-        assertSame(byteValue, parameter.resolveInstance(picoContainer, null, Byte.TYPE, pn, false, null));
-        assertSame(byteValue, parameter.resolveInstance(picoContainer, null, Byte.class, pn, false, null));
+        assertSame(byteValue, parameter.resolveInstance(containerContainer, null, Byte.TYPE, pn, false, null));
+        assertSame(byteValue, parameter.resolveInstance(containerContainer, null, Byte.class, pn, false, null));
         Short shortValue = (short)5;
         parameter = new ConstantParameter(shortValue);
-        assertSame(shortValue, parameter.resolveInstance(picoContainer, null, Short.TYPE, pn, false, null));
-        assertSame(shortValue, parameter.resolveInstance(picoContainer, null, Short.class, pn, false, null));
+        assertSame(shortValue, parameter.resolveInstance(containerContainer, null, Short.TYPE, pn, false, null));
+        assertSame(shortValue, parameter.resolveInstance(containerContainer, null, Short.class, pn, false, null));
         Integer intValue = 5;
         parameter = new ConstantParameter(intValue);
-        assertSame(intValue, parameter.resolveInstance(picoContainer, null, Integer.TYPE, pn, false, null));
-        assertSame(intValue, parameter.resolveInstance(picoContainer, null, Integer.class, pn, false, null));
+        assertSame(intValue, parameter.resolveInstance(containerContainer, null, Integer.TYPE, pn, false, null));
+        assertSame(intValue, parameter.resolveInstance(containerContainer, null, Integer.class, pn, false, null));
         Long longValue = (long)5;
         parameter = new ConstantParameter(longValue);
-        assertSame(longValue, parameter.resolveInstance(picoContainer, null, Long.TYPE, pn, false, null));
-        assertSame(longValue, parameter.resolveInstance(picoContainer, null, Long.class, pn, false, null));
+        assertSame(longValue, parameter.resolveInstance(containerContainer, null, Long.TYPE, pn, false, null));
+        assertSame(longValue, parameter.resolveInstance(containerContainer, null, Long.class, pn, false, null));
         Float floatValue = new Float(5.5);
         parameter = new ConstantParameter(floatValue);
-        assertSame(floatValue, parameter.resolveInstance(picoContainer, null, Float.TYPE, pn, false, null));
-        assertSame(floatValue, parameter.resolveInstance(picoContainer, null, Float.class, pn, false, null));
+        assertSame(floatValue, parameter.resolveInstance(containerContainer, null, Float.TYPE, pn, false, null));
+        assertSame(floatValue, parameter.resolveInstance(containerContainer, null, Float.class, pn, false, null));
         Double doubleValue = 5.5;
         parameter = new ConstantParameter(doubleValue);
-        assertSame(doubleValue, parameter.resolveInstance(picoContainer, null, Double.TYPE, pn, false, null));
-        assertSame(doubleValue, parameter.resolveInstance(picoContainer, null, Double.class, pn, false, null));
+        assertSame(doubleValue, parameter.resolveInstance(containerContainer, null, Double.TYPE, pn, false, null));
+        assertSame(doubleValue, parameter.resolveInstance(containerContainer, null, Double.class, pn, false, null));
         Boolean booleanValue = true;
         parameter = new ConstantParameter(booleanValue);
-        assertSame(booleanValue, parameter.resolveInstance(picoContainer, null, Boolean.TYPE, pn, false, null));
-        assertSame(booleanValue, parameter.resolveInstance(picoContainer, null, Boolean.class, pn, false, null));
+        assertSame(booleanValue, parameter.resolveInstance(containerContainer, null, Boolean.TYPE, pn, false, null));
+        assertSame(booleanValue, parameter.resolveInstance(containerContainer, null, Boolean.class, pn, false, null));
         Character charValue = 'x';
         parameter = new ConstantParameter(charValue);
-        assertSame(charValue, parameter.resolveInstance(picoContainer, null, Character.TYPE, pn, false, null));
-        assertSame(charValue, parameter.resolveInstance(picoContainer, null, Character.class, pn, false, null));
+        assertSame(charValue, parameter.resolveInstance(containerContainer, null, Character.TYPE, pn, false, null));
+        assertSame(charValue, parameter.resolveInstance(containerContainer, null, Character.class, pn, false, null));
     }
 
     @Test public void testConstantParameterWithPrimitivesRejectsUnexpectedType() throws CompositionException {
-        MutableContainer picoContainer = new DefaultContainer();
+        MutableContainer containerContainer = new DefaultContainer();
         Byte byteValue = (byte)5;
         ConstantParameter parameter = new ConstantParameter(byteValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Integer.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Integer.TYPE, pn, false, null));
         Short shortValue = (short)5;
         parameter = new ConstantParameter(shortValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
         Integer intValue = 5;
         parameter = new ConstantParameter(intValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
         Long longValue = (long)5;
         parameter = new ConstantParameter(longValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
         Float floatValue = new Float(5.5);
         parameter = new ConstantParameter(floatValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
         Double doubleValue = 5.5;
         parameter = new ConstantParameter(doubleValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
         Boolean booleanValue = true;
         parameter = new ConstantParameter(booleanValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
         Character charValue = 'x';
         parameter = new ConstantParameter(charValue);
-        assertFalse(parameter.isResolvable(picoContainer, null, Byte.TYPE, pn, false, null));
+        assertFalse(parameter.isResolvable(containerContainer, null, Byte.TYPE, pn, false, null));
     }
 
     @Test public void testKeyClashBug118() throws CompositionException {
-        DefaultContainer pico = new DefaultContainer();
-        pico.addComponent("A", String.class, new ConstantParameter("A"));
-        pico.addComponent("B", String.class, new ConstantParameter("A"));
-        new VerifyingVisitor().traverse(pico);
+        DefaultContainer container = new DefaultContainer();
+        container.addComponent("A", String.class, new ConstantParameter("A"));
+        container.addComponent("B", String.class, new ConstantParameter("A"));
+        new VerifyingVisitor().traverse(container);
     }
 
 }



Mime
View raw message