org.picocontainer.tck
Class AbstractPicoContainerTestCase

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
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractDelegatingMutablePicoContainerTestCase, AbstractImplementationHidingPicoContainerTestCase, DefaultPicoContainerTestCase, DefaultPicoContainerTreeSerializationTestCase

public abstract class AbstractPicoContainerTestCase
extends org.jmock.MockObjectTestCase

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


Nested Class Summary
static class AbstractPicoContainerTestCase.ComponentA
           
static class AbstractPicoContainerTestCase.ComponentB
           
static class AbstractPicoContainerTestCase.ComponentC
           
static class AbstractPicoContainerTestCase.ComponentD
           
static class AbstractPicoContainerTestCase.ComponentE
           
static class AbstractPicoContainerTestCase.ComponentF
           
static class AbstractPicoContainerTestCase.ContainerDependency
           
static class AbstractPicoContainerTestCase.DerivedTouchable
           
static class AbstractPicoContainerTestCase.JMSService
           
static class AbstractPicoContainerTestCase.LifeCycleMonitoring
           
static class AbstractPicoContainerTestCase.ListAdder
           
static class AbstractPicoContainerTestCase.NeedsTouchable
           
static class AbstractPicoContainerTestCase.NeedsWashable
           
static class AbstractPicoContainerTestCase.NonGreedyClass
           
static class AbstractPicoContainerTestCase.RecordingStrategyVisitor
           
static class AbstractPicoContainerTestCase.TestBehavior
           
static class AbstractPicoContainerTestCase.TestLifecycleComponent
           
 
Field Summary
 
Fields inherited from class org.jmock.core.MockObjectSupportTestCase
ANYTHING, NOT_NULL, NULL
 
Constructor Summary
AbstractPicoContainerTestCase()
           
 
Method Summary
protected abstract  org.picocontainer.MutablePicoContainer createPicoContainer(org.picocontainer.PicoContainer parent)
           
protected  org.picocontainer.MutablePicoContainer createPicoContainerWithDependsOnTouchableOnly()
           
protected  org.picocontainer.MutablePicoContainer createPicoContainerWithTouchableAndDependsOnTouchable()
           
 void testAcceptImplementsBreadthFirstStrategy()
           
 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 testExternallyInstantiatedObjectsCanBeRegistgeredAndLookedUp()
           
 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 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

AbstractPicoContainerTestCase

public AbstractPicoContainerTestCase()
Method Detail

createPicoContainer

protected abstract org.picocontainer.MutablePicoContainer createPicoContainer(org.picocontainer.PicoContainer parent)

createPicoContainerWithDependsOnTouchableOnly

protected final org.picocontainer.MutablePicoContainer createPicoContainerWithDependsOnTouchableOnly()
                                                                                              throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.PicoCompositionException

createPicoContainerWithTouchableAndDependsOnTouchable

protected final org.picocontainer.MutablePicoContainer createPicoContainerWithTouchableAndDependsOnTouchable()
                                                                                                      throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.PicoCompositionException

testBasicInstantiationAndContainment

public void testBasicInstantiationAndContainment()
                                          throws org.picocontainer.PicoException
Throws:
org.picocontainer.PicoException

testRegisteredComponentsExistAndAreTheCorrectTypes

public void testRegisteredComponentsExistAndAreTheCorrectTypes()
                                                        throws org.picocontainer.PicoException
Throws:
org.picocontainer.PicoException

testRegistersSingleInstance

public void testRegistersSingleInstance()
                                 throws org.picocontainer.PicoException
Throws:
org.picocontainer.PicoException

testContainerIsSerializable

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

testSerializedContainerCanRetrieveImplementation

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

testGettingComponentWithMissingDependencyFails

public void testGettingComponentWithMissingDependencyFails()
                                                    throws org.picocontainer.PicoException
Throws:
org.picocontainer.PicoException

testDuplicateRegistration

public void testDuplicateRegistration()

testExternallyInstantiatedObjectsCanBeRegistgeredAndLookedUp

public void testExternallyInstantiatedObjectsCanBeRegistgeredAndLookedUp()
                                                                  throws org.picocontainer.PicoException
Throws:
org.picocontainer.PicoException

testAmbiguousResolution

public void testAmbiguousResolution()
                             throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.PicoCompositionException

testLookupWithUnregisteredKeyReturnsNull

public void testLookupWithUnregisteredKeyReturnsNull()
                                              throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.PicoCompositionException

testLookupWithUnregisteredTypeReturnsNull

public void testLookupWithUnregisteredTypeReturnsNull()
                                               throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.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()
Important! Nanning really, really depends on this!


testSameInstanceCanBeUsedAsDifferentTypeWhenCaching

public void testSameInstanceCanBeUsedAsDifferentTypeWhenCaching()

testRegisterComponentWithObjectBadType

public void testRegisterComponentWithObjectBadType()
                                            throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.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()

testAcceptImplementsBreadthFirstStrategy

public void testAcceptImplementsBreadthFirstStrategy()

testAmbiguousDependencies

public void testAmbiguousDependencies()
                               throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.PicoCompositionException

testNoArgConstructorToBeSelected

public void testNoArgConstructorToBeSelected()


Copyright © 2003-2007 Codehaus. All Rights Reserved.