org.picocontainer.tck
Class AbstractPicoContainerTest

java.lang.Object
  extended by org.picocontainer.tck.AbstractPicoContainerTest
Direct Known Subclasses:
AbstractImplementationHidingPicoContainerTest, DefaultClassLoadingPicoContainerTestCase, DefaultPicoContainerTestCase, DefaultPicoContainerTreeSerializationTestCase, DelegatingMutablePicoContainerTestCase

public abstract class AbstractPicoContainerTest
extends Object

This test tests (at least it should) all the methods in MutablePicoContainer.


Nested Class Summary
static class AbstractPicoContainerTest.ComponentA
           
static class AbstractPicoContainerTest.ComponentB
           
static class AbstractPicoContainerTest.ComponentC
           
static class AbstractPicoContainerTest.ComponentD
           
static class AbstractPicoContainerTest.ComponentE
           
static class AbstractPicoContainerTest.ComponentF
           
static class AbstractPicoContainerTest.ContainerDependency
           
static class AbstractPicoContainerTest.DerivedTouchable
           
static class AbstractPicoContainerTest.JMSService
           
static class AbstractPicoContainerTest.LifeCycleMonitoring
           
static class AbstractPicoContainerTest.ListAdder
           
static class AbstractPicoContainerTest.NeedsTouchable
           
static class AbstractPicoContainerTest.NeedsWashable
           
static class AbstractPicoContainerTest.NonGreedyClass
           
static class AbstractPicoContainerTest.RecordingStrategyVisitor
           
static class AbstractPicoContainerTest.TestBehavior
           
static class AbstractPicoContainerTest.TestLifecycleComponent
           
 
Constructor Summary
AbstractPicoContainerTest()
           
 
Method Summary
protected  void addContainers(List expectedList)
           
protected  void addDefaultComponentFactories(List expectedList)
           
protected abstract  MutablePicoContainer createPicoContainer(PicoContainer parent)
           
protected  MutablePicoContainer createPicoContainerWithDependsOnTouchableOnly()
           
protected  MutablePicoContainer createPicoContainerWithTouchableAndDependsOnTouchable()
           
protected abstract  Properties[] getProperties()
           
 void testAcceptImplementsBreadthFirstStrategy()
           
 void testAcceptIsAbortable()
          Verifies that you can halt a container traversal.
 void testAggregatedVerificationException()
           
 void testAmbiguousDependencies()
           
 void testAmbiguousResolution()
           
 void testBasicInstantiationAndContainment()
           
 void testComponentAdapterRegistrationOrderIsMaintained()
          Important! Nanning really, really depends on this!
 void testComponentInstancesFromParentsAreNotDirectlyAccessible2()
           
 void testContainerCascadesDefaultLifecycle()
           
 void testContainerIsSerializable()
           
 void testCyclicDependencyThrowsCyclicDependencyException()
           
 void testCyclicDependencyThrowsCyclicDependencyExceptionWithParentContainer()
           
 void testDuplicateRegistration()
           
 void testExternallyInstantiatedObjectsCanBeRegisteredAndLookedUp()
           
 void testGettingComponentWithMissingDependencyFails()
           
 void testLookupWithUnregisteredKeyReturnsNull()
           
 void testLookupWithUnregisteredTypeReturnsNull()
           
 void testMakingOfChildContainer()
           
 void testMakingOfChildContainerPercolatesLifecycleManager()
           
 void testNoArgConstructorToBeSelected()
           
 void testPico52()
           
 void testRegisterComponentWithObjectBadType()
           
 void testRegisteredComponentsExistAndAreTheCorrectTypes()
           
 void testRegistersSingleInstance()
           
 void testRemovalNonRegisteredComponentAdapterWorksAndReturnsNull()
           
 void testSameInstanceCanBeUsedAsDifferentTypeWhenCaching()
           
 void testSerializedContainerCanRetrieveImplementation()
           
 void testShouldCascadeStartStopAndDisposeToChild()
           
 void testShouldReturnNonMutableParent()
           
 void testShouldReturnNullForComponentAdapterOfUnregisteredType()
           
 void testShouldReturnNullWhenUnregistereingUnmanagedComponent()
           
 void testStartStopAndDisposeCascadedtoChildren()
           
 void testStartStopAndDisposeNotCascadedtoRemovedChildren()
           
 void testUnsatisfiableDependenciesExceptionGivesUnsatisfiedDependencyTypes()
           
 void testUnsatisfiableDependenciesExceptionGivesVerboseEnoughErrorMessage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPicoContainerTest

public AbstractPicoContainerTest()
Method Detail

createPicoContainer

protected abstract MutablePicoContainer createPicoContainer(PicoContainer parent)

createPicoContainerWithDependsOnTouchableOnly

protected final MutablePicoContainer createPicoContainerWithDependsOnTouchableOnly()
                                                                            throws PicoCompositionException
Throws:
PicoCompositionException

createPicoContainerWithTouchableAndDependsOnTouchable

protected final MutablePicoContainer createPicoContainerWithTouchableAndDependsOnTouchable()
                                                                                    throws PicoCompositionException
Throws:
PicoCompositionException

testBasicInstantiationAndContainment

public void testBasicInstantiationAndContainment()
                                          throws PicoException
Throws:
PicoException

testRegisteredComponentsExistAndAreTheCorrectTypes

public void testRegisteredComponentsExistAndAreTheCorrectTypes()
                                                        throws PicoException
Throws:
PicoException

testRegistersSingleInstance

public void testRegistersSingleInstance()
                                 throws PicoException
Throws:
PicoException

testContainerIsSerializable

public void testContainerIsSerializable()
                                 throws PicoException,
                                        IOException,
                                        ClassNotFoundException
Throws:
PicoException
IOException
ClassNotFoundException

testSerializedContainerCanRetrieveImplementation

public void testSerializedContainerCanRetrieveImplementation()
                                                      throws PicoException,
                                                             IOException,
                                                             ClassNotFoundException
Throws:
PicoException
IOException
ClassNotFoundException

testGettingComponentWithMissingDependencyFails

public void testGettingComponentWithMissingDependencyFails()
                                                    throws PicoException
Throws:
PicoException

testDuplicateRegistration

public void testDuplicateRegistration()

testExternallyInstantiatedObjectsCanBeRegisteredAndLookedUp

public void testExternallyInstantiatedObjectsCanBeRegisteredAndLookedUp()
                                                                 throws PicoException
Throws:
PicoException

testAmbiguousResolution

public void testAmbiguousResolution()
                             throws PicoCompositionException
Throws:
PicoCompositionException

testLookupWithUnregisteredKeyReturnsNull

public void testLookupWithUnregisteredKeyReturnsNull()
                                              throws PicoCompositionException
Throws:
PicoCompositionException

testLookupWithUnregisteredTypeReturnsNull

public void testLookupWithUnregisteredTypeReturnsNull()
                                               throws PicoCompositionException
Throws:
PicoCompositionException

testUnsatisfiableDependenciesExceptionGivesVerboseEnoughErrorMessage

public void testUnsatisfiableDependenciesExceptionGivesVerboseEnoughErrorMessage()

testUnsatisfiableDependenciesExceptionGivesUnsatisfiedDependencyTypes

public void testUnsatisfiableDependenciesExceptionGivesUnsatisfiedDependencyTypes()

testCyclicDependencyThrowsCyclicDependencyException

public void testCyclicDependencyThrowsCyclicDependencyException()

testCyclicDependencyThrowsCyclicDependencyExceptionWithParentContainer

public void testCyclicDependencyThrowsCyclicDependencyExceptionWithParentContainer()

testRemovalNonRegisteredComponentAdapterWorksAndReturnsNull

public void testRemovalNonRegisteredComponentAdapterWorksAndReturnsNull()

testComponentAdapterRegistrationOrderIsMaintained

public void testComponentAdapterRegistrationOrderIsMaintained()
                                                       throws NoSuchMethodException
Important! Nanning really, really depends on this!

Throws:
NoSuchMethodException

testSameInstanceCanBeUsedAsDifferentTypeWhenCaching

public void testSameInstanceCanBeUsedAsDifferentTypeWhenCaching()

testRegisterComponentWithObjectBadType

public void testRegisterComponentWithObjectBadType()
                                            throws PicoCompositionException
Throws:
PicoCompositionException

testPico52

public void testPico52()

testAggregatedVerificationException

public void testAggregatedVerificationException()

testShouldReturnNullWhenUnregistereingUnmanagedComponent

public void testShouldReturnNullWhenUnregistereingUnmanagedComponent()

testShouldReturnNullForComponentAdapterOfUnregisteredType

public void testShouldReturnNullForComponentAdapterOfUnregisteredType()

testShouldReturnNonMutableParent

public void testShouldReturnNonMutableParent()

testContainerCascadesDefaultLifecycle

public void testContainerCascadesDefaultLifecycle()

testComponentInstancesFromParentsAreNotDirectlyAccessible2

public void testComponentInstancesFromParentsAreNotDirectlyAccessible2()

testStartStopAndDisposeCascadedtoChildren

public void testStartStopAndDisposeCascadedtoChildren()

testMakingOfChildContainer

public void testMakingOfChildContainer()

testMakingOfChildContainerPercolatesLifecycleManager

public void testMakingOfChildContainerPercolatesLifecycleManager()

testStartStopAndDisposeNotCascadedtoRemovedChildren

public void testStartStopAndDisposeNotCascadedtoRemovedChildren()

testShouldCascadeStartStopAndDisposeToChild

public void testShouldCascadeStartStopAndDisposeToChild()

getProperties

protected abstract Properties[] getProperties()

testAcceptImplementsBreadthFirstStrategy

public void testAcceptImplementsBreadthFirstStrategy()

testAcceptIsAbortable

public void testAcceptIsAbortable()
Verifies that you can halt a container traversal.


addContainers

protected void addContainers(List expectedList)

addDefaultComponentFactories

protected void addDefaultComponentFactories(List expectedList)

testAmbiguousDependencies

public void testAmbiguousDependencies()
                               throws PicoCompositionException
Throws:
PicoCompositionException

testNoArgConstructorToBeSelected

public void testNoArgConstructorToBeSelected()


Copyright © 2003-2010 Codehaus. All Rights Reserved.