org.picocontainer.defaults
Class DefaultPicoContainerTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jmock.core.VerifyingTestCase
              extended by org.jmock.core.MockObjectSupportTestCase
                  extended by org.jmock.MockObjectTestCase
                      extended by org.picocontainer.tck.AbstractPicoContainerTestCase
                          extended by org.picocontainer.defaults.DefaultPicoContainerTestCase
All Implemented Interfaces:
junit.framework.Test

public class DefaultPicoContainerTestCase
extends AbstractPicoContainerTestCase

Version:
$Revision: 3116 $
Author:
Aslak Hellesøy, Paul Hammant, Ward Cunningham, Mauro Talevi

Nested Class Summary
static interface DefaultPicoContainerTestCase.A
           
private static class DefaultPicoContainerTestCase.ComponentAdapterFactoryWithNoMonitor
           
private static class DefaultPicoContainerTestCase.ComponentAdapterWithNoMonitor
           
static class DefaultPicoContainerTestCase.DependsOnCollection
           
static class DefaultPicoContainerTestCase.FailingLifecycleStrategy
           
static class DefaultPicoContainerTestCase.MyPicoContainer
           
static class DefaultPicoContainerTestCase.MyStartable
           
static class DefaultPicoContainerTestCase.Service
           
static class DefaultPicoContainerTestCase.SimpleA
           
static class DefaultPicoContainerTestCase.Thingie
           
static class DefaultPicoContainerTestCase.TransientComponent
           
static class DefaultPicoContainerTestCase.WrappingA
           
 
Nested classes/interfaces inherited from class org.picocontainer.tck.AbstractPicoContainerTestCase
AbstractPicoContainerTestCase.ComponentA, AbstractPicoContainerTestCase.ComponentB, AbstractPicoContainerTestCase.ComponentC, AbstractPicoContainerTestCase.ComponentD, AbstractPicoContainerTestCase.ComponentE, AbstractPicoContainerTestCase.ComponentF, AbstractPicoContainerTestCase.ContainerDependency, AbstractPicoContainerTestCase.DerivedTouchable, AbstractPicoContainerTestCase.JMSService, AbstractPicoContainerTestCase.LifeCycleMonitoring, AbstractPicoContainerTestCase.ListAdder, AbstractPicoContainerTestCase.NeedsTouchable, AbstractPicoContainerTestCase.NeedsWashable, AbstractPicoContainerTestCase.NonGreedyClass, AbstractPicoContainerTestCase.RecordingStrategyVisitor, AbstractPicoContainerTestCase.TestLifecycleComponent, AbstractPicoContainerTestCase.TestLifecycleManager
 
Field Summary
 
Fields inherited from class org.jmock.core.MockObjectSupportTestCase
ANYTHING, NOT_NULL, NULL
 
Constructor Summary
DefaultPicoContainerTestCase()
           
 
Method Summary
protected  org.picocontainer.MutablePicoContainer createPicoContainer(org.picocontainer.PicoContainer parent)
           
 void testCanChangeMonitor()
           
 void testCanChangeMonitorOfChildContainers()
           
 void testCannotReturnCurrentMonitor()
           
 void testCanRegisterTwoComponentsImplementingSameInterfaceOneWithInterfaceAsKey()
           
 void testCanRegisterTwoComponentsWithSameImplementionAndDifferentKey()
           
 void testCanReturnCurrentMonitorFromChildContainer()
           
 void testCanReturnCurrentMonitorFromComponentAdapter()
           
 void testCanReturnCurrentMonitorFromComponentAdapterFactory()
           
 void testCanUseCustomLifecycleStrategyForClassRegistrations()
           
 void testCanUseCustomLifecycleStrategyForInstanceRegistrations()
           
 void testChangeMonitorIsIgnoredIfNotSupportingStrategy()
           
 void testComponentInstancesListIsReturnedForNullType()
           
 void testComponentsCanBeRemovedByInstance()
           
 void testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType()
           
 void testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter()
           
 void testDerivedPicoContainerCanOverloadRegisterComponentForAllCreatedComponentAdapters()
           
 void testGetComponentAdaptersOfTypeNullReturnsEmptyList()
           
 void testInstantiationWithMonitorAndParent()
           
 void testInstantiationWithNullComponentAdapterFactory()
           
 void testMakeChildContainer()
           
 void testShouldProvideInfoAboutDependingWhenAmbiguityHappens()
           
 void testStartCapturedByMonitor()
           
 void testThangCanBeInstantiatedWithArrayList()
           
 void testUnambiguouSelfDependency()
           
 void testUpDownDependenciesCannotBeFollowed()
           
 
Methods inherited from class org.picocontainer.tck.AbstractPicoContainerTestCase
createPicoContainerWithDependsOnTouchableOnly, createPicoContainerWithTouchableAndDependsOnTouchable, testAcceptImplementsBreadthFirstStrategy, testAggregatedVerificationException, testAmbiguousDependencies, testAmbiguousResolution, testBasicInstantiationAndContainment, testComponentAdapterRegistrationOrderIsMaintained, testComponentInstancesFromParentsAreNotDirectlyAccessible2, testContainerCascadesDefaultLifecycle, testContainerIsSerializable, testCyclicDependencyThrowsCyclicDependencyException, testCyclicDependencyThrowsCyclicDependencyExceptionWithParentContainer, testDuplicateRegistration, testExternallyInstantiatedObjectsCanBeRegistgeredAndLookedUp, testGettingComponentWithMissingDependencyFails, testLookupWithUnregisteredKeyReturnsNull, testLookupWithUnregisteredTypeReturnsNull, testMakingOfChildContainer, testMakingOfChildContainerPercolatesLifecycleManager, testNoArgConstructorToBeSelected, testPico52, testRegisterComponentWithObjectBadType, testRegisteredComponentsExistAndAreTheCorrectTypes, testRegistersSingleInstance, testRemovalNonRegisteredComponentAdapterWorksAndReturnsNull, testSameInstanceCanBeUsedAsDifferentTypeWhenCaching, testSerializedContainerCanRetrieveImplementation, testShouldCascadeStartStopAndDisposeToChild, testShouldReturnNonMutableParent, testShouldReturnNullForComponentAdapterOfUnregisteredType, testShouldReturnNullWhenUnregistereingUnmanagedComponent, testStartStopAndDisposeCascadedtoChildren, testStartStopAndDisposeNotCascadedtoRemovedChildren, testUnsatisfiableDependenciesExceptionGivesUnsatisfiedDependencyTypes, testUnsatisfiableDependenciesExceptionGivesVerboseEnoughErrorMessage
 
Methods inherited from class org.jmock.MockObjectTestCase
atLeastOnce, atMostOnce, defaultMockNameForType, doAll, doAll, doAll, doAll, exactly, mock, mock, never, never, newCoreMock, newDummy, newDummy, newDummy, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnIterator, returnIterator, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException
 
Methods inherited from class org.jmock.core.MockObjectSupportTestCase
and, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, collectionContaining, collectionContaining, compatibleType, contains, endsWith, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, hasProperty, hasProperty, isA, isIn, isIn, mapContaining, mapContaining, mapWithKey, mapWithKey, mapWithValue, mapWithValue, not, or, same, startsWith, stringContains, toString
 
Methods inherited from class org.jmock.core.VerifyingTestCase
registerToVerify, runBare, unregisterToVerify, verify
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultPicoContainerTestCase

public DefaultPicoContainerTestCase()
Method Detail

createPicoContainer

protected org.picocontainer.MutablePicoContainer createPicoContainer(org.picocontainer.PicoContainer parent)
Specified by:
createPicoContainer in class AbstractPicoContainerTestCase

testInstantiationWithNullComponentAdapterFactory

public void testInstantiationWithNullComponentAdapterFactory()

testUpDownDependenciesCannotBeFollowed

public void testUpDownDependenciesCannotBeFollowed()

testComponentsCanBeRemovedByInstance

public void testComponentsCanBeRemovedByInstance()

testComponentInstancesListIsReturnedForNullType

public void testComponentInstancesListIsReturnedForNullType()

testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType

public void testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType()

testUnambiguouSelfDependency

public void testUnambiguouSelfDependency()

testThangCanBeInstantiatedWithArrayList

public void testThangCanBeInstantiatedWithArrayList()

testGetComponentAdaptersOfTypeNullReturnsEmptyList

public void testGetComponentAdaptersOfTypeNullReturnsEmptyList()

testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter

public void testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter()

testShouldProvideInfoAboutDependingWhenAmbiguityHappens

public void testShouldProvideInfoAboutDependingWhenAmbiguityHappens()

testInstantiationWithMonitorAndParent

public void testInstantiationWithMonitorAndParent()

testStartCapturedByMonitor

public void testStartCapturedByMonitor()

testCanChangeMonitor

public void testCanChangeMonitor()

testCanChangeMonitorOfChildContainers

public void testCanChangeMonitorOfChildContainers()

testChangeMonitorIsIgnoredIfNotSupportingStrategy

public void testChangeMonitorIsIgnoredIfNotSupportingStrategy()

testCanReturnCurrentMonitorFromComponentAdapterFactory

public void testCanReturnCurrentMonitorFromComponentAdapterFactory()

testCanReturnCurrentMonitorFromComponentAdapter

public void testCanReturnCurrentMonitorFromComponentAdapter()

testCanReturnCurrentMonitorFromChildContainer

public void testCanReturnCurrentMonitorFromChildContainer()

testCannotReturnCurrentMonitor

public void testCannotReturnCurrentMonitor()

testMakeChildContainer

public void testMakeChildContainer()

testCanUseCustomLifecycleStrategyForClassRegistrations

public void testCanUseCustomLifecycleStrategyForClassRegistrations()

testCanUseCustomLifecycleStrategyForInstanceRegistrations

public void testCanUseCustomLifecycleStrategyForInstanceRegistrations()

testCanRegisterTwoComponentsImplementingSameInterfaceOneWithInterfaceAsKey

public void testCanRegisterTwoComponentsImplementingSameInterfaceOneWithInterfaceAsKey()
                                                                                throws java.lang.Exception
Throws:
java.lang.Exception

testCanRegisterTwoComponentsWithSameImplementionAndDifferentKey

public void testCanRegisterTwoComponentsWithSameImplementionAndDifferentKey()
                                                                     throws java.lang.Exception
Throws:
java.lang.Exception

testDerivedPicoContainerCanOverloadRegisterComponentForAllCreatedComponentAdapters

public void testDerivedPicoContainerCanOverloadRegisterComponentForAllCreatedComponentAdapters()