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 [1/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
Author: mauro
Date: Tue Jan 22 09:25:16 2008
New Revision: 614266

URL: http://svn.apache.org/viewvc?rev=614266&view=rev
Log:
Removed remnant references to picocontainer.  Left Jira issues codes until the information contained in these is ported.

Modified:
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/ContainerVisitor.java
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/DefaultContainer.java
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/containers/AbstractDelegatingContainer.java
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/AbstractContainerVisitor.java
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/MethodCallingVisitor.java
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/TraversalCheckingVisitor.java
    incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/VerifyingVisitor.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ComposerVisitorTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ContainerBuilderTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/DefaultContainerTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/adapters/InstanceAdapterTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/alternatives/ImplementationHidingContainerTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/AutomatingTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/BehaviorAdapterTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachedTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachingTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/HiddenImplementationTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/ImplementationHidingTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/InterceptingTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/OptInCachingTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/PropertyApplyingTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/SynchronizedTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/containers/CommandLineArgumentsContainerTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/containers/EmptyContainerTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/containers/ImmutableContainerTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/CollectionComponentParameterTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/ComponentKeysTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/ComposerExceptionsTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/DefaultComponentRegistryTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/DefaultContainerLifecycleTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/GenericsTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/NoneOfTheseTestsAffectCoverageMeaningTheyCouldGoTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/UserQuestionTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/XStreamSerialisationTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0191TestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0196TestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0265TestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/defaults/issues/Issue0280TestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedFieldInjectorTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectionTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/AnnotatedMethodInjectorTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectionTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/ConstructorInjectorTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/MethodInjectionTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectionTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/injectors/SetterInjectorTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/monitors/NullComponentMonitorTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/parameters/ParameterTestCase.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/tck/AbstractComponentAdapterTest.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/tck/AbstractComponentFactoryTest.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/tck/AbstractContainerTest.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/tck/AbstractLazyInstantiationTest.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/tck/AbstractMultipleConstructorTest.java
    incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/visitors/TraversalCheckingVisitorTest.java

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/ContainerVisitor.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/ContainerVisitor.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/ContainerVisitor.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/ContainerVisitor.java Tue Jan 22 09:25:16 2008
@@ -39,10 +39,10 @@
     /**
      * Visit a {@link Container} that has to accept the visitor.
      * 
-     * @param pico the visited container.
+     * @param container the visited container.
      */
 
-    void visitContainer(Container pico);
+    void visitContainer(Container container);
     /**
      * Visit a {@link ComponentAdapter} that has to accept the visitor.
      * 

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/DefaultContainer.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/DefaultContainer.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/DefaultContainer.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/DefaultContainer.java Tue Jan 22 09:25:16 2008
@@ -285,7 +285,7 @@
 
     /** {@inheritDoc} **/
     private <T> ComponentAdapter<T> getComponentAdapter(final Class<T> componentType, final NameBinding componentNameBinding, final Class<? extends Annotation> binding) {
-        // See http://jira.codehaus.org/secure/ViewIssue.jspa?key=PICO-115
+        // See issue PICO-115
         ComponentAdapter<?> adapterByKey = getComponentAdapter(componentType);
         if (adapterByKey != null) {
             return typeComponentAdapter(adapterByKey);

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/containers/AbstractDelegatingContainer.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/containers/AbstractDelegatingContainer.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/containers/AbstractDelegatingContainer.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/containers/AbstractDelegatingContainer.java Tue Jan 22 09:25:16 2008
@@ -28,7 +28,7 @@
 import org.apache.composer.core.ContainerVisitor;
 
 /**
- * abstract base class for immutable delegation to pico
+ * abstract base class for immutable delegation to container
  * 
  * @author k.pribluda
  * 

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/AbstractContainerVisitor.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/AbstractContainerVisitor.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/AbstractContainerVisitor.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/AbstractContainerVisitor.java Tue Jan 22 09:25:16 2008
@@ -25,7 +25,7 @@
 import java.security.PrivilegedAction;
 
 /**
- * Abstract PicoVisitor implementation. A generic traverse method is implemented, that 
+ * Abstract ContainerVisitor implementation. A generic traverse method is implemented, that 
  * accepts any object with a method named &quot;accept&quot;, that takes a 
  * {@link org.apache.composer.core.ContainerVisitor}  as argument and and invokes it. Additionally it provides the
  * {@link #checkTraversal()} method, that throws a {@link AbstractContainerVisitor.ComposerVisitorTraversalException},
@@ -81,7 +81,7 @@
     }
 
     /**
-     * Exception for a PicoVisitor, that is dependent on a defined starting point of the traversal.
+     * Exception for a ContainerVisitor, that is dependent on a defined starting point of the traversal.
      * If the traversal is not initiated with a call of {@link org.apache.composer.core.ContainerVisitor#traverse}
      *
      * @author joehni
@@ -90,12 +90,12 @@
             extends ComposerException {
 
         /**
-         * Construct the PicoVisitorTraversalException.
+         * Construct the ContainerVisitorTraversalException.
          *
          * @param visitor The visitor casing the exception.
          */
         public ComposerVisitorTraversalException(ContainerVisitor visitor) {
-            super("Traversal for PicoVisitor of type " + visitor.getClass().getName() + " must start with the visitor's traverse method");
+            super("Traversal for ContainerVisitor of type " + visitor.getClass().getName() + " must start with the visitor's traverse method");
         }
     }
 

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/MethodCallingVisitor.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/MethodCallingVisitor.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/MethodCallingVisitor.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/MethodCallingVisitor.java Tue Jan 22 09:25:16 2008
@@ -28,7 +28,7 @@
 
 
 /**
- * A PicoVisitor implementation, that calls methods on the components of a specific type.
+ * A ContainerVisitor implementation, that calls methods on the components of a specific type.
  * 
  * @author Aslak Helles&oslash;y
  * @author J&ouml;rg Schaible
@@ -90,9 +90,9 @@
         return Void.TYPE;
     }
 
-    public void visitContainer(Container pico) {
-        super.visitContainer(pico);
-        componentInstances.addAll(pico.getComponents(type));
+    public void visitContainer(Container container) {
+        super.visitContainer(container);
+        componentInstances.addAll(container.getComponents(type));
     }
 
     protected Method getMethod() {

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/TraversalCheckingVisitor.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/TraversalCheckingVisitor.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/TraversalCheckingVisitor.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/TraversalCheckingVisitor.java Tue Jan 22 09:25:16 2008
@@ -34,10 +34,10 @@
  *
  * final List allContainers = new ArrayList();
  *
- * PicoVisitor visitor = new TraversalCheckingVisitor() {
- *     public void visitContainer(Container pico) {
- *         super.visitContainer(pico);  //Calls checkTraversal for us.
- *         allContainers.add(pico);
+ * ContainerVisitor visitor = new TraversalCheckingVisitor() {
+ *     public void visitContainer(Container container) {
+ *         super.visitContainer(container);  //Calls checkTraversal for us.
+ *         allContainers.add(container);
  *     }
  * }
  * </pre>
@@ -47,7 +47,7 @@
 public class TraversalCheckingVisitor
         extends AbstractContainerVisitor {
 
-    public void visitContainer(Container pico) {
+    public void visitContainer(Container container) {
         checkTraversal();
     }
 

Modified: incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/VerifyingVisitor.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/VerifyingVisitor.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/VerifyingVisitor.java (original)
+++ incubator/composer/trunk/composer-core/src/main/java/org/apache/composer/core/visitors/VerifyingVisitor.java Tue Jan 22 09:25:16 2008
@@ -39,7 +39,7 @@
     private final List nestedVerificationExceptions;
     private final Set verifiedComponentAdapters;
     private final ContainerVisitor componentAdapterCollector;
-    private Container currentPico;
+    private Container currentContainer;
 
     /**
      * Construct a VerifyingVisitor.
@@ -71,16 +71,16 @@
         return Void.TYPE;
     }
 
-    public void visitContainer(Container pico) {
-        super.visitContainer(pico);
-        currentPico = pico;
+    public void visitContainer(Container container) {
+        super.visitContainer(container);
+        currentContainer = container;
     }
 
     public void visitComponentAdapter(ComponentAdapter componentAdapter) {
         super.visitComponentAdapter(componentAdapter);
         if (!verifiedComponentAdapters.contains(componentAdapter)) {
             try {
-                componentAdapter.verify(currentPico);
+                componentAdapter.verify(currentContainer);
             } catch (RuntimeException e) {
                 nestedVerificationExceptions.add(e);
             }
@@ -94,7 +94,7 @@
             return null;
         }
 
-        public void visitContainer(Container pico) {
+        public void visitContainer(Container container) {
         }
 
         // /CLOVER:ON

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ComposerVisitorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ComposerVisitorTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ComposerVisitorTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ComposerVisitorTestCase.java Tue Jan 22 09:25:16 2008
@@ -43,9 +43,9 @@
 	private Mockery mockery = mockeryWithCountingNamingScheme();
 	
     @Test public void testVisitorThatMustBeInvokedUsingTraverse() {
-        MutableContainer pico = new DefaultContainer();
+        MutableContainer container = new DefaultContainer();
         try {
-            pico.accept(new VerifyingVisitor());
+            container.accept(new VerifyingVisitor());
             fail("ComposerVisitorTraversalException expected");
         } catch (AbstractContainerVisitor.ComposerVisitorTraversalException e) {
             assertTrue(e.getMessage().indexOf(VerifyingVisitor.class.getName()) >= 0);
@@ -76,15 +76,15 @@
     }
 
     @Test public void testThrownRuntimeExceptionIsUnwrapped() {
-    	final Container pico = mockery.mock(Container.class);
+    	final Container container = mockery.mock(Container.class);
         final ContainerVisitor visitor = new VerifyingVisitor();
         final Error exception = new Error("junit");
         mockery.checking(new Expectations() {{
-            one(pico).accept(with(same(visitor)));
+            one(container).accept(with(same(visitor)));
             will(throwException(new CompositionException("message", exception)));
         }});
         try {
-            visitor.traverse(pico);
+            visitor.traverse(container);
             fail("ComposerCompositionException expected");
         } catch (CompositionException e) {
             assertEquals("message", e.getMessage());
@@ -93,18 +93,18 @@
     }
 
     @Test public void testThrownErrorIsUnwrapped() {
-    	final Container pico = mockery.mock(Container.class);
+    	final Container container = mockery.mock(Container.class);
         final ContainerVisitor visitor = new VerifyingVisitor();
         final Error error = new InternalError("junit");
         final Sequence sequence = mockery.sequence("accepting");
         mockery.checking(new Expectations() {{
-            one(pico).accept(with(same(visitor))); inSequence(sequence);
-            one(pico).accept(with(same(visitor))); inSequence(sequence);
+            one(container).accept(with(same(visitor))); inSequence(sequence);
+            one(container).accept(with(same(visitor))); inSequence(sequence);
             will(throwException(error));
         }});
-        visitor.traverse(pico);
+        visitor.traverse(container);
         try {
-            visitor.traverse(pico);
+            visitor.traverse(container);
             fail("UndeclaredThrowableException expected");
         } catch(InternalError e) {
             assertEquals("junit", e.getMessage());

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ContainerBuilderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ContainerBuilderTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ContainerBuilderTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/ContainerBuilderTestCase.java Tue Jan 22 09:25:16 2008
@@ -50,7 +50,7 @@
     @Before
     public void setUp() throws Exception {
         xs = new XStream();
-        xs.alias("PICO", DefaultContainer.class);
+        xs.alias("CONTAINER", DefaultContainer.class);
         xs.registerConverter(new Converter() {
             public boolean canConvert(Class aClass) {
                 return aClass.getName().equals("org.apache.composer.core.DefaultContainer$1") ||
@@ -73,12 +73,12 @@
     @Test public void testBasic() {
         MutableContainer mpc = new ContainerBuilder().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithStartableLifecycle() {
@@ -87,19 +87,19 @@
 
         MutableContainer mpc = new ContainerBuilder().withLifecycle().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.StartableLifecycleStrategy\n" +
                 "    componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor reference=/PICO/lifecycleStrategy/componentMonitor\n" +
-                "PICO",foo);
+                "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor reference=/CONTAINER/lifecycleStrategy/componentMonitor\n" +
+                "CONTAINER",foo);
     }
 
     @Test public void testWithReflectionLifecycle() {
         MutableContainer mpc = new ContainerBuilder().withReflectionLifecycle().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.ReflectionLifecycleStrategy\n" +
@@ -109,47 +109,47 @@
                 "      stringdisposestring\n" +
                 "    methodNames\n" +
                 "    componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor reference=/PICO/lifecycleStrategy/componentMonitor\n" +
-                "PICO",foo);
+                "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor reference=/CONTAINER/lifecycleStrategy/componentMonitor\n" +
+                "CONTAINER",foo);
     }
 
 
     @Test public void testWithConsoleMonitor() {
         MutableContainer mpc = new ContainerBuilder().withConsoleMonitor().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.ConsoleComponentMonitor\n" +
                 "    delegate=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithConsoleMonitorAndLifecycleUseTheSameUltimateMonitor() {
         MutableContainer mpc = new ContainerBuilder().withLifecycle().withConsoleMonitor().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                      "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                      "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                      "  lifecycleStrategy=org.apache.composer.core.lifecycle.StartableLifecycleStrategy\n" +
                      "    componentMonitor=org.apache.composer.core.monitors.ConsoleComponentMonitor\n" +
                      "      delegate=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                     "  componentMonitor=org.apache.composer.core.monitors.ConsoleComponentMonitor reference=/PICO/lifecycleStrategy/componentMonitor\n" +
-                     "PICO",foo);
+                     "  componentMonitor=org.apache.composer.core.monitors.ConsoleComponentMonitor reference=/CONTAINER/lifecycleStrategy/componentMonitor\n" +
+                     "CONTAINER",foo);
     }
 
 
     @Test public void testWithCustomMonitorByClass() {
         MutableContainer mpc = new ContainerBuilder().withMonitor(ConsoleComponentMonitor.class).build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.ConsoleComponentMonitor\n" +
                 "    delegate=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @SuppressWarnings({ "unchecked" })
@@ -167,31 +167,31 @@
     @Test public void testWithImplementationHiding() {
         MutableContainer mpc = new ContainerBuilder().withHiddenImplementations().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.ImplementationHiding\n" +
                 "    delegate=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithImplementationHidingInstance() {
         MutableContainer mpc = new ContainerBuilder().withComponentFactory(new ImplementationHiding()).build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.ImplementationHiding\n" +
                 "    delegate=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithCafsListChainThingy() {
         MutableContainer mpc = new ContainerBuilder(SDI()).withBehaviors(caching(), synchronizing(), implementationHiding()).build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.Caching\n" +
                 "    delegate=org.apache.composer.core.behaviors.Synchronizing\n" +
                 "      delegate=org.apache.composer.core.behaviors.ImplementationHiding\n" +
@@ -200,7 +200,7 @@
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
 
@@ -209,90 +209,90 @@
     @Test public void testWithCustomParentContainer() {
         MutableContainer mpc = new ContainerBuilder(new CustomParentcontainer()).build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.ContainerBuilderTestCase_CustomParentcontainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithBogusParentContainerBehavesAsIfNotSet() {
         MutableContainer mpc = new ContainerBuilder((Container)null).build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                      "  componentFactory=org.apache.composer.core.injectors.AdaptingInjection\n" +
                      "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                      "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                      "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                     "PICO", foo);
+                     "CONTAINER", foo);
     }
 
 
     @Test public void testWithSetterDI() {
         MutableContainer mpc = new ContainerBuilder().withSetterInjection().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.SetterInjection\n" +
                 "    set\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithAnnotatedMethodDI() {
             MutableContainer mpc = new ContainerBuilder().withAnnotatedMethodInjection().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AnnotatedMethodInjection\n" +
                 "    org.apache.composer.core.annotations.Inject\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithAnnotatedFieldDI() {
             MutableContainer mpc = new ContainerBuilder().withAnnotatedFieldInjection().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.AnnotatedFieldInjection\n" +
                 "    org.apache.composer.core.annotations.Inject\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithCtorDI() {
         MutableContainer mpc = new ContainerBuilder().withConstructorInjection().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.injectors.ConstructorInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithImplementationHidingAndSetterDI() {
         MutableContainer mpc = new ContainerBuilder().withHiddenImplementations().withSetterInjection().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.ImplementationHiding\n" +
                 "    delegate=org.apache.composer.core.injectors.SetterInjection\n" +
                 "      set\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithCachingImplementationHidingAndSetterDI() {
         MutableContainer mpc = new ContainerBuilder().withCaching().withHiddenImplementations().withSetterInjection().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.Caching\n" +
                 "    delegate=org.apache.composer.core.behaviors.ImplementationHiding\n" +
                 "      delegate=org.apache.composer.core.injectors.SetterInjection\n" +
@@ -300,55 +300,55 @@
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithSynchronizing() {
         MutableContainer mpc = new ContainerBuilder().withSynchronizing().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.Synchronizing\n" +
                 "    delegate=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithLocking() {
         MutableContainer mpc = new ContainerBuilder().withLocking().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                 "  componentFactory=org.apache.composer.core.behaviors.Locking\n" +
                 "    delegate=org.apache.composer.core.injectors.AdaptingInjection\n" +
                 "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                 "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                 "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                "PICO",foo);
+                "CONTAINER",foo);
     }
 
     @Test public void testWithPropertyApplier() {
         MutableContainer mpc = new ContainerBuilder().withPropertyApplier().build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                      "  componentFactory=org.apache.composer.core.behaviors.PropertyApplying\n" +
                      "    delegate=org.apache.composer.core.injectors.AdaptingInjection\n" +
                      "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                      "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                      "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                     "PICO",foo);
+                     "CONTAINER",foo);
     }
 
     //TODO - fix up to refer to SomeContainerDependency
     @Test public void testWithCustomComponentFactory() {
         MutableContainer mpc = new ContainerBuilder().withCustomContainerComponent(new SomeContainerDependency()).withComponentFactory(CustomComponentFactory.class).build();
         String foo = simplifyRepresentation(mpc);
-        assertEquals("PICO\n" +
+        assertEquals("CONTAINER\n" +
                      "  componentFactory=org.apache.composer.core.ContainerBuilderTestCase_CustomComponentFactory\n" +
                      "  parent=org.apache.composer.core.containers.EmptyContainer\n" +
                      "  lifecycleStrategy=org.apache.composer.core.lifecycle.NullLifecycleStrategy\n" +
                      "  componentMonitor=org.apache.composer.core.monitors.NullComponentMonitor\n" +
-                     "PICO",foo);
+                     "CONTAINER",foo);
     }
 
     public static class SomeContainerDependency {

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/DefaultContainerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/DefaultContainerTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/DefaultContainerTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/DefaultContainerTestCase.java Tue Jan 22 09:25:16 2008
@@ -98,54 +98,54 @@
 	}
 
 	@Test public void testComponentsCanBeRemovedByInstance() {
-		MutableContainer pico = createContainer(null);
-		pico.addComponent(HashMap.class);
-		pico.addComponent(ArrayList.class);
-		List list = pico.getComponent(List.class);
-		pico.removeComponentByInstance(list);
-		assertEquals(1, pico.getComponentAdapters().size());
-		assertEquals(1, pico.getComponents().size());
-		assertEquals(HashMap.class, pico.getComponent(Serializable.class)
+		MutableContainer container = createContainer(null);
+		container.addComponent(HashMap.class);
+		container.addComponent(ArrayList.class);
+		List list = container.getComponent(List.class);
+		container.removeComponentByInstance(list);
+		assertEquals(1, container.getComponentAdapters().size());
+		assertEquals(1, container.getComponents().size());
+		assertEquals(HashMap.class, container.getComponent(Serializable.class)
 				.getClass());
 	}
 
 	@Test public void testComponentInstancesListIsReturnedForNullType() {
-		MutableContainer pico = createContainer(null);
-		List componentInstances = pico.getComponents(null);
+		MutableContainer container = createContainer(null);
+		List componentInstances = container.getComponents(null);
 		assertNotNull(componentInstances);
 		assertEquals(0, componentInstances.size());
 	}
 
 	@Test public void testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType() {
-		MutableContainer pico = createContainer(null);
-		pico.addComponent(LinkedList.class, LinkedList.class, Parameter.ZERO);
-		pico.addComponent(ArrayList.class);
-		assertEquals(ArrayList.class, pico
+		MutableContainer container = createContainer(null);
+		container.addComponent(LinkedList.class, LinkedList.class, Parameter.ZERO);
+		container.addComponent(ArrayList.class);
+		assertEquals(ArrayList.class, container
 				.getComponent((Class) ArrayList.class).getClass());
 	}
 
 	/*
-	 * When pico tries to resolve DecoratedTouchable it find as dependency
+	 * When container tries to resolve DecoratedTouchable it find as dependency
 	 * itself and SimpleTouchable. Problem is basically the same as above. Comooser
 	 * should not consider self as solution.
 	 * 
 	 * JS fixed it ( PICO-222 ) KP
 	 */
 	@Test public void testUnambiguouSelfDependency() {
-		MutableContainer pico = createContainer(null);
-		pico.addComponent(SimpleTouchable.class);
-		pico.addComponent(DecoratedTouchable.class);
-		Touchable t = (Touchable) pico
+		MutableContainer container = createContainer(null);
+		container.addComponent(SimpleTouchable.class);
+		container.addComponent(DecoratedTouchable.class);
+		Touchable t = (Touchable) container
 				.getComponent((Object) DecoratedTouchable.class);
 		assertNotNull(t);
 	}
 
 	@Test public void testUsedInBuilderStyle() {
-		MutableContainer pico = createContainer(null);
-		Touchable t = pico.change(Characteristics.CACHE).addComponent(
+		MutableContainer container = createContainer(null);
+		Touchable t = container.change(Characteristics.CACHE).addComponent(
 				SimpleTouchable.class).addComponent(DecoratedTouchable.class)
 				.getComponent(DecoratedTouchable.class);
-		SimpleTouchable t2 = pico.getComponent(SimpleTouchable.class);
+		SimpleTouchable t2 = container.getComponent(SimpleTouchable.class);
 		assertNotNull(t);
 		assertNotNull(t2);
 		t.touch();
@@ -159,15 +159,15 @@
 	}
 
 	@Test public void testThangCanBeInstantiatedWithArrayList() {
-		MutableContainer pico = new DefaultContainer();
-		pico.addComponent(Thingie.class);
-		pico.addComponent(ArrayList.class);
-		assertNotNull(pico.getComponent(Thingie.class));
+		MutableContainer container = new DefaultContainer();
+		container.addComponent(Thingie.class);
+		container.addComponent(ArrayList.class);
+		assertNotNull(container.getComponent(Thingie.class));
 	}
 
 	@Test public void testGetComponentAdaptersOfTypeNullReturnsEmptyList() {
-		DefaultContainer pico = new DefaultContainer();
-		List adapters = pico.getComponentAdapters(null);
+		DefaultContainer container = new DefaultContainer();
+		List adapters = container.getComponentAdapters(null);
 		assertNotNull(adapters);
 		assertEquals(0, adapters.size());
 	}
@@ -185,18 +185,18 @@
 
 	@Test public void testDefaultContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter() {
 
-		DefaultContainer picoContainer = new DefaultContainer(
+		DefaultContainer containerContainer = new DefaultContainer(
 				new Caching().wrap(new ConstructorInjection()));
 
-		picoContainer.addComponent(Service.class);
-		picoContainer.as(Characteristics.NO_CACHE).addAdapter(
+		containerContainer.addComponent(Service.class);
+		containerContainer.as(Characteristics.NO_CACHE).addAdapter(
 				new ConstructorInjector(TransientComponent.class,
 						TransientComponent.class, null,
 						new NullComponentMonitor(),
 						new NullLifecycleStrategy(), false));
-		TransientComponent c1 = picoContainer
+		TransientComponent c1 = containerContainer
 				.getComponent(TransientComponent.class);
-		TransientComponent c2 = picoContainer
+		TransientComponent c2 = containerContainer
 				.getComponent(TransientComponent.class);
 		assertNotSame(c1, c2);
 		assertSame(c1.service, c2.service);
@@ -208,12 +208,12 @@
 	}
 
 	@Test public void testShouldProvideInfoAboutDependingWhenAmbiguityHappens() {
-		MutableContainer pico = this.createContainer(null);
-		pico.addComponent(new ArrayList());
-		pico.addComponent(new LinkedList());
-		pico.addComponent(DependsOnCollection.class);
+		MutableContainer container = this.createContainer(null);
+		container.addComponent(new ArrayList());
+		container.addComponent(new LinkedList());
+		container.addComponent(DependsOnCollection.class);
 		try {
-			pico.getComponent(DependsOnCollection.class);
+			container.getComponent(DependsOnCollection.class);
 			fail();
 		} catch (AbstractInjector.AmbiguousComponentResolutionException expected) {
 			String doc = DependsOnCollection.class.getName();
@@ -256,10 +256,10 @@
 	}
 
 	public static class StartableClazz implements Startable {
-		private MutableContainer _pico;
+		private MutableContainer _container;
 
 		public void start() {
-			List<SimpleTouchable> cps = _pico
+			List<SimpleTouchable> cps = _container
 					.getComponents(SimpleTouchable.class);
 			assertNotNull(cps);
 		}
@@ -280,7 +280,7 @@
 		DefaultContainer dpc = new DefaultContainer();
 		dpc.addComponent(SimpleTouchable.class);
 		StartableClazz cl = new StartableClazz();
-		cl._pico = dpc;
+		cl._container = dpc;
 		dpc.addComponent(cl);
 		dpc.start();
 	}
@@ -288,24 +288,24 @@
 	@Test public void testCanChangeMonitor() {
 		StringWriter writer1 = new StringWriter();
 		ComponentMonitor monitor1 = new WriterComponentMonitor(writer1);
-		DefaultContainer pico = new DefaultContainer(monitor1);
-		pico.addComponent("t1", SimpleTouchable.class);
-		pico.addComponent("t3", SimpleTouchable.class);
-		Touchable t1 = (Touchable) pico.getComponent("t1");
+		DefaultContainer container = new DefaultContainer(monitor1);
+		container.addComponent("t1", SimpleTouchable.class);
+		container.addComponent("t3", SimpleTouchable.class);
+		Touchable t1 = (Touchable) container.getComponent("t1");
 		assertNotNull(t1);
 		final String s = writer1.toString();
 		assertTrue("writer not empty", s.length() > 0);
 		StringWriter writer2 = new StringWriter();
 		ComponentMonitor monitor2 = new WriterComponentMonitor(writer2);
-		pico.changeMonitor(monitor2);
-		pico.addComponent("t2", SimpleTouchable.class);
-		Touchable t2 = (Touchable) pico.getComponent("t2");
+		container.changeMonitor(monitor2);
+		container.addComponent("t2", SimpleTouchable.class);
+		Touchable t2 = (Touchable) container.getComponent("t2");
 		assertNotNull(t2);
 		final String s2 = writer2.toString();
 		assertTrue("writer not empty", s2.length() > 0);
 		assertTrue("writers of same length",
 				writer1.toString().length() == writer2.toString().length());
-		Touchable t3 = (Touchable) pico.getComponent("t3");
+		Touchable t3 = (Touchable) container.getComponent("t3");
 		assertNotNull(t3);
 		assertTrue("old writer was used", writer1.toString().length() < writer2
 				.toString().length());
@@ -353,12 +353,12 @@
 	@Test public void testCanReturnCurrentMonitorFromComponentFactory() {
 		StringWriter writer1 = new StringWriter();
 		ComponentMonitor monitor1 = new WriterComponentMonitor(writer1);
-		DefaultContainer pico = new DefaultContainer(monitor1);
-		assertEquals(monitor1, pico.currentMonitor());
+		DefaultContainer container = new DefaultContainer(monitor1);
+		assertEquals(monitor1, container.currentMonitor());
 		StringWriter writer2 = new StringWriter();
 		ComponentMonitor monitor2 = new WriterComponentMonitor(writer2);
-		pico.changeMonitor(monitor2);
-		assertEquals(monitor2, pico.currentMonitor());
+		container.changeMonitor(monitor2);
+		assertEquals(monitor2, container.currentMonitor());
 	}
 
 	private static final class ComponentFactoryWithNoMonitor implements
@@ -557,10 +557,10 @@
 	}
 
 	public static class ListComponentsInStartClass implements Startable {
-		private MutableContainer _pico;
+		private MutableContainer _container;
 
 		public void start() {
-			List<SimpleTouchable> cps = _pico
+			List<SimpleTouchable> cps = _container
 					.getComponents(SimpleTouchable.class);
 			assertNotNull(cps);
 		}
@@ -570,14 +570,13 @@
 
 	}
 
-	/**
-	 * JIRA: PICO-295 reported by Erik Putrycz
-	 */
+
+	// PICO-295 reported by Erik Putrycz
 	@Test public void testListComponentsInStart() {
 		DefaultContainer dpc = new DefaultContainer();
 		dpc.addComponent(SimpleTouchable.class);
 		ListComponentsInStartClass cl = new ListComponentsInStartClass();
-		cl._pico = dpc;
+		cl._container = dpc;
 		dpc.addComponent(cl);
 		dpc.start();
 	}

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/adapters/InstanceAdapterTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/adapters/InstanceAdapterTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/adapters/InstanceAdapterTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/adapters/InstanceAdapterTestCase.java Tue Jan 22 09:25:16 2008
@@ -58,10 +58,10 @@
         InstanceAdapter adapter =
             new InstanceAdapter(LifecycleComponent.class, component, new StartableLifecycleStrategy(new NullComponentMonitor()),
                                                                         new NullComponentMonitor());
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
         assertEquals("start>stop>dispose>", component.buffer.toString());
         adapter.start(component);
         adapter.stop(component);
@@ -89,10 +89,10 @@
         NullLifecycle component = new NullLifecycle();
         RecordingLifecycleStrategy strategy = new RecordingLifecycleStrategy(new StringBuffer());
         InstanceAdapter adapter = new InstanceAdapter(NullLifecycle.class, component, strategy, new NullComponentMonitor());
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
         assertEquals("<start<stop<dispose", strategy.recording());
         adapter.start(component);
         adapter.stop(component);
@@ -104,10 +104,10 @@
         final Touchable touchable = new SimpleTouchable();
         InstanceAdapter adapter = new InstanceAdapter(Touchable.class, touchable, new NullLifecycleStrategy(),
                                                                         new NullComponentMonitor());
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
         adapter.start(touchable);
         adapter.stop(touchable);
         adapter.dispose(touchable);
@@ -144,7 +144,7 @@
      * {@inheritDoc}
      * @see org.apache.composer.core.tck.AbstractComponentAdapterTestCase#prepDEF_verifyWithoutDependencyWorks(org.apache.composer.core.MutableContainer)
      */
-    protected ComponentAdapter prepDEF_verifyWithoutDependencyWorks(MutableContainer picoContainer) {
+    protected ComponentAdapter prepDEF_verifyWithoutDependencyWorks(MutableContainer containerContainer) {
         return new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(),
                                                                         new NullComponentMonitor());
     }
@@ -154,7 +154,7 @@
      * @see org.apache.composer.core.tck.AbstractComponentAdapterTestCase#prepDEF_verifyDoesNotInstantiate(org.apache.composer.core.MutableContainer)
      */
     protected ComponentAdapter prepDEF_verifyDoesNotInstantiate(
-            MutableContainer picoContainer) {
+            MutableContainer containerContainer) {
         return new InstanceAdapter("Key", 4711, new NullLifecycleStrategy(),
                                                                         new NullComponentMonitor());
     }
@@ -172,7 +172,7 @@
      * {@inheritDoc}
      * @see org.apache.composer.core.tck.AbstractComponentAdapterTestCase#prepSER_isSerializable(org.apache.composer.core.MutableContainer)
      */
-    protected ComponentAdapter prepSER_isSerializable(MutableContainer picoContainer) {
+    protected ComponentAdapter prepSER_isSerializable(MutableContainer containerContainer) {
         return new InstanceAdapter("Key", 4711, new NullLifecycleStrategy(),
                                                                         new NullComponentMonitor());
     }
@@ -181,7 +181,7 @@
      * {@inheritDoc}
      * @see org.apache.composer.core.tck.AbstractComponentAdapterTestCase#prepSER_isXStreamSerializable(org.apache.composer.core.MutableContainer)
      */
-    protected ComponentAdapter prepSER_isXStreamSerializable(MutableContainer picoContainer) {
+    protected ComponentAdapter prepSER_isXStreamSerializable(MutableContainer containerContainer) {
         return new InstanceAdapter("Key", 4711, new NullLifecycleStrategy(),
                                                                         new NullComponentMonitor());
     }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/alternatives/ImplementationHidingContainerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/alternatives/ImplementationHidingContainerTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/alternatives/ImplementationHidingContainerTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/alternatives/ImplementationHidingContainerTestCase.java Tue Jan 22 09:25:16 2008
@@ -26,8 +26,8 @@
 public class ImplementationHidingContainerTestCase {
 
     @Test public void canFindNonNullCtors() {
-        final MutableContainer pico = new DefaultContainer(new ImplementationHiding().wrap(new ConstructorInjection()));
-        pico.addComponent(A.class);
+        final MutableContainer container = new DefaultContainer(new ImplementationHiding().wrap(new ConstructorInjection()));
+        container.addComponent(A.class);
 
         /* This is a workaround for the bug described further down. Normally
          * this method call should only be needed if specific requirements for
@@ -36,7 +36,7 @@
          * this is currently the only way to register a class/interface such
          * that the automatic resolution works.
          */
-        pico.addComponent(I1.class, B.class);
+        container.addComponent(I1.class, B.class);
 
         /* The following addAdapter(Object, Class) of
          * ImplementationHidingContainer is buggy, as it contains
@@ -46,11 +46,11 @@
          * DefaultContainer, i.e. if Apache Container shall resolve
          * dependencies itself.
          */
-        pico.addComponent(I2.class, C.class);
+        container.addComponent(I2.class, C.class);
 
         /* The following verify() throws the exception, but is expected not to
          * throw: "org.apache.composer.core.ContainerVerificationException:
-         * [[org.apache.composer.core.PicoCompositionException: Either do the
+         * [[org.apache.composer.core.ContainerCompositionException: Either do the
          * specified parameters not match any of the following constructors:
          * [public ContainerBugTest$C(ContainerBugTest$A)] or the
          * constructors were not accessible for 'class
@@ -65,7 +65,7 @@
          * nullary constructor shall be used, and if that doesn't exist, the
          * exception is thrown.
          */
-        new VerifyingVisitor().traverse(pico);
+        new VerifyingVisitor().traverse(container);
     }
 
     public static interface I1 {

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/AutomatingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/AutomatingTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/AutomatingTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/AutomatingTestCase.java Tue Jan 22 09:25:16 2008
@@ -45,121 +45,121 @@
     }
 
     @Test public void testAutomaticBehavior() {
-        DefaultContainer pico = new DefaultContainer(new Caching().wrap(new Automating()));
-        pico.addComponent(StringBuilder.class);
-        pico.addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        DefaultContainer container = new DefaultContainer(new Caching().wrap(new Automating()));
+        container.addComponent(StringBuilder.class);
+        container.addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testAutomaticBehaviorViaAdapter() {
-        DefaultContainer pico = new DefaultContainer(new Caching().wrap(new Automating()));
-        pico.addComponent(StringBuilder.class);
-        pico.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        DefaultContainer container = new DefaultContainer(new Caching().wrap(new Automating()));
+        container.addComponent(StringBuilder.class);
+        container.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testNonAutomaticBehaviorAsContrastToTheAbove() {
-        DefaultContainer pico = new DefaultContainer(new Caching());
-        pico.addComponent(StringBuilder.class);
-        pico.addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        DefaultContainer container = new DefaultContainer(new Caching());
+        container.addComponent(StringBuilder.class);
+        container.addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals("", sb.toString());
     }
 
     @Test public void testNonAutomaticBehaviorAsContrastToTheAboveViaAdapter() {
-        DefaultContainer pico = new DefaultContainer(new Caching());
-        pico.addComponent(StringBuilder.class);
-        pico.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        DefaultContainer container = new DefaultContainer(new Caching());
+        container.addComponent(StringBuilder.class);
+        container.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals("", sb.toString());
     }
 
     @Test public void testAutomaticBehaviorByBuilder() {
-        MutableContainer pico = new ContainerBuilder().withCaching().withAutomatic().build();
-        pico.addComponent(StringBuilder.class);
-        pico.addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        MutableContainer container = new ContainerBuilder().withCaching().withAutomatic().build();
+        container.addComponent(StringBuilder.class);
+        container.addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testAutomaticBehaviorByBuilderViaAdapter() {
-        MutableContainer pico = new ContainerBuilder().withCaching().withAutomatic().build();
-        pico.addComponent(StringBuilder.class);
-        pico.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        MutableContainer container = new ContainerBuilder().withCaching().withAutomatic().build();
+        container.addComponent(StringBuilder.class);
+        container.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testAutomaticBehaviorByBuilderADifferentWay() {
-        MutableContainer pico = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
-        pico.addComponent(StringBuilder.class);
-        pico.addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        MutableContainer container = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
+        container.addComponent(StringBuilder.class);
+        container.addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
         @Test public void testAutomaticBehaviorByBuilderADifferentWayViaAdapter() {
-        MutableContainer pico = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
-        pico.addComponent(StringBuilder.class);
-        pico.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        MutableContainer container = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
+        container.addComponent(StringBuilder.class);
+        container.addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-            assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+            assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testAutomaticBehaviorWorksForAdaptiveBehaviorToo() {
-        MutableContainer pico = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
-        pico.addComponent(StringBuilder.class);
-        pico.as(AUTOMATIC).addComponent(Foo.class);
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        MutableContainer container = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
+        container.addComponent(StringBuilder.class);
+        container.as(AUTOMATIC).addComponent(Foo.class);
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
     @Test public void testAutomaticBehaviorWorksForAdaptiveBehaviorTooViaAdapter() {
-        MutableContainer pico = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
-        pico.addComponent(StringBuilder.class);
-        pico.as(AUTOMATIC).addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
-        pico.addComponent(Bar.class);
-        pico.start();
-        assertNotNull(pico.getComponent(Bar.class));
-        StringBuilder sb = pico.getComponent(StringBuilder.class);
+        MutableContainer container = new ContainerBuilder().withBehaviors(caching(), automatic()).build();
+        container.addComponent(StringBuilder.class);
+        container.as(AUTOMATIC).addAdapter(new ConstructorInjector(Foo.class, Foo.class, null, new NullComponentMonitor(), new NullLifecycleStrategy(), false));
+        container.addComponent(Bar.class);
+        container.start();
+        assertNotNull(container.getComponent(Bar.class));
+        StringBuilder sb = container.getComponent(StringBuilder.class);
         assertEquals(MESSAGE, sb.toString());
-        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", pico.getComponentAdapter(Foo.class).toString());
+        assertEquals("Cached:Automated:ConstructorInjector-class org.apache.composer.core.behaviors.AutomatingTestCase$Foo", container.getComponentAdapter(Foo.class).toString());
     }
 
 }

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/BehaviorAdapterTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/BehaviorAdapterTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/BehaviorAdapterTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/BehaviorAdapterTestCase.java Tue Jan 22 09:25:16 2008
@@ -56,7 +56,7 @@
         adapter.changeMonitor(mockMonitorWithNoExpectedMethods());
         try {
             adapter.currentMonitor();
-            fail("PicoCompositionException expected");
+            fail("ContainerCompositionException expected");
         } catch (CompositionException e) {
             assertEquals("No component monitor found in delegate", e.getMessage());
         }
@@ -64,10 +64,10 @@
     
     @Test public void testDecoratingComponentAdapterDelegatesLifecycleManagement() {
         AbstractBehavior adapter = new FooAbstractBehavior(mockComponentAdapterThatCanManageLifecycle());
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
         Touchable touchable = new SimpleTouchable();
         adapter.start(touchable);
         adapter.stop(touchable);
@@ -76,10 +76,10 @@
 
     @Test public void testDecoratingComponentAdapterIgnoresLifecycleManagementIfDelegateDoesNotSupportIt() {
         AbstractBehavior adapter = new FooAbstractBehavior(mockComponentAdapter());
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
         Touchable touchable = new SimpleTouchable();
         adapter.start(touchable);
         adapter.stop(touchable);

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachedTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachedTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachedTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachedTestCase.java Tue Jan 22 09:25:16 2008
@@ -48,30 +48,30 @@
     @Test public void testComponentIsNotStartedWhenCachedAndCanBeStarted() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(true, false, false));
-        Container pico = new DefaultContainer();
-        adapter.getComponentInstance(pico);
-        adapter.start(pico);
+        Container container = new DefaultContainer();
+        adapter.getComponentInstance(container);
+        adapter.start(container);
     }
 
     @Test public void testComponentCanBeStartedAgainAfterBeingStopped() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(true, true, false));
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        Object instanceAfterFirstStart = adapter.getComponentInstance(pico);
-        adapter.stop(pico);
-        adapter.start(pico);
-        Object instanceAfterSecondStart = adapter.getComponentInstance(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        Object instanceAfterFirstStart = adapter.getComponentInstance(container);
+        adapter.stop(container);
+        adapter.start(container);
+        Object instanceAfterSecondStart = adapter.getComponentInstance(container);
         assertSame(instanceAfterFirstStart, instanceAfterSecondStart);
     }
 
     @Test public void testComponentCannotBeStartedIfDisposed() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(false, false, true));
-        Container pico = new DefaultContainer();
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.dispose(container);
         try {
-            adapter.start(pico);
+            adapter.start(container);
             fail("IllegalStateException expected");
         } catch (Exception e) {
             assertEquals("Already disposed", e.getMessage());
@@ -81,10 +81,10 @@
     @Test public void testComponentCannotBeStartedIfAlreadyStarted() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(true, false, false));
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
         try {
-            adapter.start(pico);
+            adapter.start(container);
             fail("IllegalStateException expected");
         } catch (Exception e) {
             assertEquals("Already started", e.getMessage());
@@ -94,10 +94,10 @@
     @Test public void testComponentCannotBeStoppeddIfDisposed() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(false, false, true));
-        Container pico = new DefaultContainer();
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.dispose(container);
         try {
-            adapter.stop(pico);
+            adapter.stop(container);
             fail("IllegalStateException expected");
         } catch (Exception e) {
             assertEquals("Already disposed", e.getMessage());
@@ -107,11 +107,11 @@
     @Test public void testComponentCannotBeStoppedIfNotStarted() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(true, true, false));
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
         try {
-        adapter.stop(pico);
+        adapter.stop(container);
             fail("IllegalStateException expected");
         } catch (Exception e) {
             assertEquals("Not started", e.getMessage());
@@ -121,12 +121,12 @@
     @Test public void testComponentCannotBeDisposedIfAlreadyDisposed() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(true, true, true));
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
         try {
-            adapter.dispose(pico);
+            adapter.dispose(container);
             fail("IllegalStateException expected");
         } catch (Exception e) {
             assertEquals("Already disposed", e.getMessage());
@@ -136,8 +136,8 @@
     @Test public void testComponentIsStoppedAndDisposedIfStartedWhenFlushed() {
         Cached adapter = new Cached(
                 mockComponentAdapterSupportingLifecycleStrategy(true, true, true));
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
         adapter.flush();
     }
 
@@ -156,23 +156,23 @@
     @Test public void testLifecycleIsIgnoredIfDelegateDoesNotSupportIt() {
         Cached adapter = new Cached(
                 mockComponentAdapterNotSupportingLifecycleStrategy());
-        Container pico = new DefaultContainer();
-        adapter.start(pico);
-        adapter.stop(pico);
-        adapter.dispose(pico);
+        Container container = new DefaultContainer();
+        adapter.start(container);
+        adapter.stop(container);
+        adapter.dispose(container);
     }
 
     @Test public void testCanStopAComponentThatWasNeverStartedBecauseItHasNoLifecycle() {
-        MutableContainer pico = new DefaultContainer();
+        MutableContainer container = new DefaultContainer();
 
-        pico.addComponent(StringBuffer.class);
+        container.addComponent(StringBuffer.class);
 
-        pico.start();
+        container.start();
 
-        assertNotNull(pico.getComponent(StringBuffer.class));
+        assertNotNull(container.getComponent(StringBuffer.class));
 
-        pico.stop();
-        pico.dispose();
+        container.stop();
+        container.dispose();
     }
 
     private ComponentAdapter mockComponentAdapterNotSupportingLifecycleStrategy() {

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachingTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachingTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/CachingTestCase.java Tue Jan 22 09:25:16 2008
@@ -42,54 +42,54 @@
     }
 
     @Test public void testAddComponentUsesCachingBehavior() {
-        DefaultContainer pico =
+        DefaultContainer container =
             new DefaultContainer(new Caching().wrap(new ConstructorInjection()));
-        pico.addComponent("foo", String.class);
-        ComponentAdapter foo = pico.getComponentAdapter("foo");
+        container.addComponent("foo", String.class);
+        ComponentAdapter foo = container.getComponentAdapter("foo");
         assertEquals(Cached.class, foo.getClass());
         assertEquals(ConstructorInjector.class, ((AbstractBehavior) foo).getDelegate().getClass());
     }
 
     @Test public void testAddComponentUsesCachingBehaviorWithRedundantCacheProperty() {
-        DefaultContainer pico =
+        DefaultContainer container =
             new DefaultContainer(new Caching().wrap(new ConstructorInjection()));
-        pico.change(Characteristics.CACHE).addComponent("foo", String.class);
-        ComponentAdapter foo = pico.getComponentAdapter("foo");
+        container.change(Characteristics.CACHE).addComponent("foo", String.class);
+        ComponentAdapter foo = container.getComponentAdapter("foo");
         assertEquals(Cached.class, foo.getClass());
         assertEquals(ConstructorInjector.class, ((AbstractBehavior) foo).getDelegate().getClass());
     }
 
     @Test public void testAddComponentNoesNotUseCachingBehaviorWhenNoCachePropertyIsSpecified() {
-        DefaultContainer pico =
+        DefaultContainer container =
             new DefaultContainer(new Caching().wrap(new ConstructorInjection()));
-        pico.change(Characteristics.NO_CACHE).addComponent("foo", String.class);
-        ComponentAdapter foo = pico.getComponentAdapter("foo");
+        container.change(Characteristics.NO_CACHE).addComponent("foo", String.class);
+        ComponentAdapter foo = container.getComponentAdapter("foo");
         assertEquals(ConstructorInjector.class, foo.getClass());
     }
 
     @Test public void testAddAdapterUsesCachingBehavior() {
-        DefaultContainer pico =
+        DefaultContainer container =
             new DefaultContainer(new Caching().wrap(new ConstructorInjection()));
-        pico.addAdapter(new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(), new NullComponentMonitor()));
-        ComponentAdapter foo = pico.getComponentAdapter("foo");
+        container.addAdapter(new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(), new NullComponentMonitor()));
+        ComponentAdapter foo = container.getComponentAdapter("foo");
         assertEquals(Cached.class, foo.getClass());
         assertEquals(InstanceAdapter.class, ((AbstractBehavior) foo).getDelegate().getClass());
     }
 
     @Test public void testAddAdapterUsesCachingBehaviorWithRedundantCacheProperty() {
-        DefaultContainer pico =
+        DefaultContainer container =
             new DefaultContainer(new Caching().wrap(new ConstructorInjection()));
-        pico.change(Characteristics.CACHE).addAdapter(new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(), new NullComponentMonitor()));
-        ComponentAdapter foo = pico.getComponentAdapter("foo");
+        container.change(Characteristics.CACHE).addAdapter(new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(), new NullComponentMonitor()));
+        ComponentAdapter foo = container.getComponentAdapter("foo");
         assertEquals(Cached.class, foo.getClass());
         assertEquals(InstanceAdapter.class, ((AbstractBehavior) foo).getDelegate().getClass());
     }
 
     @Test public void testAddAdapterNoesNotUseCachingBehaviorWhenNoCachePropertyIsSpecified() {
-        DefaultContainer pico =
+        DefaultContainer container =
             new DefaultContainer(new Caching().wrap(new ConstructorInjection()));
-        pico.change(Characteristics.NO_CACHE).addAdapter(new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(), new NullComponentMonitor()));
-        ComponentAdapter foo = pico.getComponentAdapter("foo");
+        container.change(Characteristics.NO_CACHE).addAdapter(new InstanceAdapter("foo", "bar", new NullLifecycleStrategy(), new NullComponentMonitor()));
+        ComponentAdapter foo = container.getComponentAdapter("foo");
         assertEquals(InstanceAdapter.class, foo.getClass());
     }    
 

Modified: incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/HiddenImplementationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/HiddenImplementationTestCase.java?rev=614266&r1=614265&r2=614266&view=diff
==============================================================================
--- incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/HiddenImplementationTestCase.java (original)
+++ incubator/composer/trunk/composer-core/src/test/java/org/apache/composer/core/behaviors/HiddenImplementationTestCase.java Tue Jan 22 09:25:16 2008
@@ -48,7 +48,7 @@
         HiddenImplementation ihca = new HiddenImplementation(ca);
         try {
             ihca.getComponentInstance(null);
-            fail("PicoCompositionException expected");
+            fail("ContainerCompositionException expected");
         } catch (CompositionException e) {
             // expected        
         }



Mime
View raw message