org.picocontainer
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.DefaultPicoContainerTestCase
All Implemented Interfaces:
junit.framework.Test

public final class DefaultPicoContainerTestCase
extends AbstractPicoContainerTestCase

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

Nested Class Summary
static interface DefaultPicoContainerTestCase.A
           
static class DefaultPicoContainerTestCase.CdiTurtle
           
static class DefaultPicoContainerTestCase.DependsOnCollection
           
static class DefaultPicoContainerTestCase.FailingLifecycleStrategy
           
static class DefaultPicoContainerTestCase.Horse
           
static class DefaultPicoContainerTestCase.MyStartable
           
static class DefaultPicoContainerTestCase.NeedsTwo
           
static class DefaultPicoContainerTestCase.SdiDonkey
           
static class DefaultPicoContainerTestCase.SdiRabbit
           
static class DefaultPicoContainerTestCase.Service
           
static class DefaultPicoContainerTestCase.SimpleA
           
static class DefaultPicoContainerTestCase.StartableClazz
           
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.TestBehavior, AbstractPicoContainerTestCase.TestLifecycleComponent
 
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)
           
protected  Properties[] getProperties()
           
 void testCanChangeMonitor()
           
 void testCanChangeMonitorOfChildContainers()
           
 void testCanRegisterTwoComponentsImplementingSameInterfaceOneWithInterfaceAsKey()
           
 void testCanRegisterTwoComponentsWithSameImplementionAndDifferentKey()
           
 void testCanReturnCurrentMonitorFromComponentFactory()
           
 void testCanUseCustomLifecycleStrategyForClassRegistrations()
           
 void testCanUseCustomLifecycleStrategyForInstanceRegistrations()
           
 void testChangeMonitorIsIgnoredIfNotSupportingStrategy()
           
 void testComponentInstancesListIsReturnedForNullType()
           
 void testComponentsCanBeRemovedByInstance()
           
 void testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType()
           
 void testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter()
           
 void testGetComponentAdaptersOfTypeNullReturnsEmptyList()
           
 void testInstantiationWithMonitorAndParent()
           
 void testInstantiationWithNullComponentFactory()
           
 void testListComponentsOnStart()
           
 void testMakeChildContainer()
           
 void testMixingOfSDIandCDI()
           
 void testMixingOfSDIandCDIDifferently()
           
 void testMixingOfSDIandCDIInBuilderStyle()
           
 void testMixingOfSDIandCDIWithTemporaryCharacterizations()
           
 void testMixingOfSDIandCDIWithTemporaryCharacterizationsDifferently()
           
 void testNoComponentIsMonitoredAndPotentiallyLateProvided()
           
 void testPicoCanDifferentiateBetweenNamedIntsThatWouldOtherwiseBeAmbiguous()
           
 void testPicoCanDifferentiateBetweenNamedObjectsThatWouldOtherwiseBeAmbiguous()
           
 void testPicoCanDifferentiateBetweenNamedStringsThatWouldOtherwiseBeAmbiguous()
           
 void testPicoUsedInBuilderStyle()
           
 void testShouldProvideInfoAboutDependingWhenAmbiguityHappens()
           
 void testStartCapturedByMonitor()
           
 void testThangCanBeInstantiatedWithArrayList()
           
 void testThatComponentCannotBeRemovedFromStartedContainer()
           
 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, testExternallyInstantiatedObjectsCanBeRegisteredAndLookedUp, 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
 
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

getProperties

protected Properties[] getProperties()
Specified by:
getProperties in class AbstractPicoContainerTestCase

testInstantiationWithNullComponentFactory

public void testInstantiationWithNullComponentFactory()

testUpDownDependenciesCannotBeFollowed

public void testUpDownDependenciesCannotBeFollowed()

testComponentsCanBeRemovedByInstance

public void testComponentsCanBeRemovedByInstance()

testComponentInstancesListIsReturnedForNullType

public void testComponentInstancesListIsReturnedForNullType()

testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType

public void testComponentsWithCommonSupertypeWhichIsAConstructorArgumentCanBeLookedUpByConcreteType()

testUnambiguouSelfDependency

public void testUnambiguouSelfDependency()

testPicoUsedInBuilderStyle

public void testPicoUsedInBuilderStyle()

testThangCanBeInstantiatedWithArrayList

public void testThangCanBeInstantiatedWithArrayList()

testGetComponentAdaptersOfTypeNullReturnsEmptyList

public void testGetComponentAdaptersOfTypeNullReturnsEmptyList()

testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter

public void testDefaultPicoContainerReturnsNewInstanceForEachCallWhenUsingTransientComponentAdapter()

testShouldProvideInfoAboutDependingWhenAmbiguityHappens

public void testShouldProvideInfoAboutDependingWhenAmbiguityHappens()

testInstantiationWithMonitorAndParent

public void testInstantiationWithMonitorAndParent()

testStartCapturedByMonitor

public void testStartCapturedByMonitor()

testListComponentsOnStart

public void testListComponentsOnStart()

testCanChangeMonitor

public void testCanChangeMonitor()

testCanChangeMonitorOfChildContainers

public void testCanChangeMonitorOfChildContainers()

testChangeMonitorIsIgnoredIfNotSupportingStrategy

public void testChangeMonitorIsIgnoredIfNotSupportingStrategy()

testCanReturnCurrentMonitorFromComponentFactory

public void testCanReturnCurrentMonitorFromComponentFactory()

testMakeChildContainer

public void testMakeChildContainer()

testCanUseCustomLifecycleStrategyForClassRegistrations

public void testCanUseCustomLifecycleStrategyForClassRegistrations()

testCanUseCustomLifecycleStrategyForInstanceRegistrations

public void testCanUseCustomLifecycleStrategyForInstanceRegistrations()

testCanRegisterTwoComponentsImplementingSameInterfaceOneWithInterfaceAsKey

public void testCanRegisterTwoComponentsImplementingSameInterfaceOneWithInterfaceAsKey()
                                                                                throws Exception
Throws:
Exception

testCanRegisterTwoComponentsWithSameImplementionAndDifferentKey

public void testCanRegisterTwoComponentsWithSameImplementionAndDifferentKey()
                                                                     throws Exception
Throws:
Exception

testPicoCanDifferentiateBetweenNamedStringsThatWouldOtherwiseBeAmbiguous

public void testPicoCanDifferentiateBetweenNamedStringsThatWouldOtherwiseBeAmbiguous()

testPicoCanDifferentiateBetweenNamedObjectsThatWouldOtherwiseBeAmbiguous

public void testPicoCanDifferentiateBetweenNamedObjectsThatWouldOtherwiseBeAmbiguous()

testPicoCanDifferentiateBetweenNamedIntsThatWouldOtherwiseBeAmbiguous

public void testPicoCanDifferentiateBetweenNamedIntsThatWouldOtherwiseBeAmbiguous()

testMixingOfSDIandCDI

public void testMixingOfSDIandCDI()

testMixingOfSDIandCDIDifferently

public void testMixingOfSDIandCDIDifferently()

testMixingOfSDIandCDIInBuilderStyle

public void testMixingOfSDIandCDIInBuilderStyle()

testMixingOfSDIandCDIWithTemporaryCharacterizations

public void testMixingOfSDIandCDIWithTemporaryCharacterizations()

testMixingOfSDIandCDIWithTemporaryCharacterizationsDifferently

public void testMixingOfSDIandCDIWithTemporaryCharacterizationsDifferently()

testNoComponentIsMonitoredAndPotentiallyLateProvided

public void testNoComponentIsMonitoredAndPotentiallyLateProvided()

testThatComponentCannotBeRemovedFromStartedContainer

public void testThatComponentCannotBeRemovedFromStartedContainer()


Copyright © 2003-2007 Codehaus. All Rights Reserved.