org.picocontainer.defaults
Class DefaultPicoContainerLifecycleTestCase

java.lang.Object
  extended by org.picocontainer.defaults.DefaultPicoContainerLifecycleTestCase

public class DefaultPicoContainerLifecycleTestCase
extends Object

This class tests the lifecycle aspects of DefaultPicoContainer.

Author:
Aslak Hellesøy, Paul Hammant, Ward Cunningham, Mauro Talevi

Nested Class Summary
static class DefaultPicoContainerLifecycleTestCase.FooRunnable
           
static class DefaultPicoContainerLifecycleTestCase.NotStartable
           
 
Constructor Summary
DefaultPicoContainerLifecycleTestCase()
           
 
Method Summary
 void testCanSpecifyLifeCycleStrategyForInstanceRegistrationWhenSpecifyingComponentFactory()
           
 void testChildContainerIsStoppedWhenStartedIndependentlyOfParent()
           
 void testComponentsAreStartedBreadthFirstAndStoppedAndDisposedDepthFirst()
           
 void testGetComponentInstancesOnParentContainerHostedChildContainerDoesntReturnParentAdapter()
           
 void testLifecycleCanRecoverWithCustomComponentMonitor()
           
 void testLifecycleDoesNotRecoverWithNullComponentMonitor()
           
 void testLifecycleFailuresCanBePickedUpAfterTheEvent()
           
 void testLifecycleIsIgnoredIfAdaptersAreNotLifecycleManagers()
           
 void testLifeCycleStrategyForInstanceRegistrationPassedToChildContainers()
           
 void testMaliciousComponentCannotExistInAChildContainerAndSeeAnyElementOfContainerHierarchy()
           
 void testOnlyStartableComponentsAreStartedOnStart()
           
 void testOrderOfInstantiationShouldBeDependencyOrder()
           
 void testOrderOfStartShouldBeDependencyOrderAndStopAndDisposeTheOpposite()
           
 void testShouldFailOnStartAfterDispose()
           
 void testShouldFailOnStopAfterDispose()
           
 void testShouldStackContainersLast()
           
 void testStartedComponentsCanBeStoppedIfSomeComponentsFailToStart()
           
 void testStartedComponentsCanBeStoppedIfSomeComponentsFailToStartEvenInAPicoHierarchy()
           
 void testStartStartShouldFail()
           
 void testStartStopDisposeDisposeShouldFail()
           
 void testStartStopOfDaemonizedThread()
           
 void testStartStopStopShouldFail()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPicoContainerLifecycleTestCase

public DefaultPicoContainerLifecycleTestCase()
Method Detail

testOrderOfInstantiationShouldBeDependencyOrder

public void testOrderOfInstantiationShouldBeDependencyOrder()
                                                     throws Exception
Throws:
Exception

testOrderOfStartShouldBeDependencyOrderAndStopAndDisposeTheOpposite

public void testOrderOfStartShouldBeDependencyOrderAndStopAndDisposeTheOpposite()
                                                                         throws Exception
Throws:
Exception

testLifecycleIsIgnoredIfAdaptersAreNotLifecycleManagers

public void testLifecycleIsIgnoredIfAdaptersAreNotLifecycleManagers()

testStartStartShouldFail

public void testStartStartShouldFail()
                              throws Exception
Throws:
Exception

testStartStopStopShouldFail

public void testStartStopStopShouldFail()
                                 throws Exception
Throws:
Exception

testStartStopDisposeDisposeShouldFail

public void testStartStopDisposeDisposeShouldFail()
                                           throws Exception
Throws:
Exception

testStartStopOfDaemonizedThread

public void testStartStopOfDaemonizedThread()
                                     throws Exception
Throws:
Exception

testGetComponentInstancesOnParentContainerHostedChildContainerDoesntReturnParentAdapter

public void testGetComponentInstancesOnParentContainerHostedChildContainerDoesntReturnParentAdapter()

testComponentsAreStartedBreadthFirstAndStoppedAndDisposedDepthFirst

public void testComponentsAreStartedBreadthFirstAndStoppedAndDisposedDepthFirst()

testMaliciousComponentCannotExistInAChildContainerAndSeeAnyElementOfContainerHierarchy

public void testMaliciousComponentCannotExistInAChildContainerAndSeeAnyElementOfContainerHierarchy()

testOnlyStartableComponentsAreStartedOnStart

public void testOnlyStartableComponentsAreStartedOnStart()

testShouldFailOnStartAfterDispose

public void testShouldFailOnStartAfterDispose()

testShouldFailOnStopAfterDispose

public void testShouldFailOnStopAfterDispose()

testShouldStackContainersLast

public void testShouldStackContainersLast()

testCanSpecifyLifeCycleStrategyForInstanceRegistrationWhenSpecifyingComponentFactory

public void testCanSpecifyLifeCycleStrategyForInstanceRegistrationWhenSpecifyingComponentFactory()
                                                                                          throws Exception
Throws:
Exception

testLifeCycleStrategyForInstanceRegistrationPassedToChildContainers

public void testLifeCycleStrategyForInstanceRegistrationPassedToChildContainers()
                                                                         throws Exception
Throws:
Exception

testLifecycleDoesNotRecoverWithNullComponentMonitor

public void testLifecycleDoesNotRecoverWithNullComponentMonitor()

testLifecycleCanRecoverWithCustomComponentMonitor

public void testLifecycleCanRecoverWithCustomComponentMonitor()
                                                       throws NoSuchMethodException
Throws:
NoSuchMethodException

testLifecycleFailuresCanBePickedUpAfterTheEvent

public void testLifecycleFailuresCanBePickedUpAfterTheEvent()

testStartedComponentsCanBeStoppedIfSomeComponentsFailToStart

public void testStartedComponentsCanBeStoppedIfSomeComponentsFailToStart()

testStartedComponentsCanBeStoppedIfSomeComponentsFailToStartEvenInAPicoHierarchy

public void testStartedComponentsCanBeStoppedIfSomeComponentsFailToStartEvenInAPicoHierarchy()

testChildContainerIsStoppedWhenStartedIndependentlyOfParent

public void testChildContainerIsStoppedWhenStartedIndependentlyOfParent()
                                                                 throws Exception
Throws:
Exception


Copyright © 2003-2010 Codehaus. All Rights Reserved.