org.picocontainer.tck
Class AbstractPicoContainerTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.jmock.core.VerifyingTestCase
org.jmock.core.MockObjectSupportTestCase
org.jmock.MockObjectTestCase
org.picocontainer.tck.AbstractPicoContainerTestCase
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- AbstractImplementationHidingPicoContainerTestCase, CachingPicoContainerTestCase, DefaultPicoContainerTestCase, DefaultPicoContainerTreeSerializationTestCase
public abstract class AbstractPicoContainerTestCase
- extends org.jmock.MockObjectTestCase
This test tests (at least it should) all the methods in MutablePicoContainer.
Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
ANYTHING, NOT_NULL, NULL |
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 |
AbstractPicoContainerTestCase
public AbstractPicoContainerTestCase()
createPicoContainer
protected abstract org.picocontainer.MutablePicoContainer createPicoContainer(org.picocontainer.PicoContainer parent)
createPicoContainerWithDependsOnTouchableOnly
protected final org.picocontainer.MutablePicoContainer createPicoContainerWithDependsOnTouchableOnly()
throws org.picocontainer.PicoRegistrationException,
org.picocontainer.PicoIntrospectionException
- Throws:
org.picocontainer.PicoRegistrationException
org.picocontainer.PicoIntrospectionException
createPicoContainerWithTouchableAndDependsOnTouchable
protected final org.picocontainer.MutablePicoContainer createPicoContainerWithTouchableAndDependsOnTouchable()
throws org.picocontainer.PicoRegistrationException,
org.picocontainer.PicoIntrospectionException
- Throws:
org.picocontainer.PicoRegistrationException
org.picocontainer.PicoIntrospectionException
testBasicInstantiationAndContainment
public void testBasicInstantiationAndContainment()
throws org.picocontainer.PicoException,
org.picocontainer.PicoRegistrationException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoRegistrationException
testRegisteredComponentsExistAndAreTheCorrectTypes
public void testRegisteredComponentsExistAndAreTheCorrectTypes()
throws org.picocontainer.PicoException,
org.picocontainer.PicoRegistrationException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoRegistrationException
testRegistersSingleInstance
public void testRegistersSingleInstance()
throws org.picocontainer.PicoException,
org.picocontainer.PicoInitializationException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoInitializationException
testContainerIsSerializable
public void testContainerIsSerializable()
throws org.picocontainer.PicoException,
org.picocontainer.PicoInitializationException,
java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoInitializationException
java.io.IOException
java.lang.ClassNotFoundException
getTouchableFromSerializedContainer
private Touchable getTouchableFromSerializedContainer()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
testSerializedContainerCanRetrieveImplementation
public void testSerializedContainerCanRetrieveImplementation()
throws org.picocontainer.PicoException,
org.picocontainer.PicoInitializationException,
java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoInitializationException
java.io.IOException
java.lang.ClassNotFoundException
testGettingComponentWithMissingDependencyFails
public void testGettingComponentWithMissingDependencyFails()
throws org.picocontainer.PicoException,
org.picocontainer.PicoRegistrationException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoRegistrationException
testDuplicateRegistration
public void testDuplicateRegistration()
throws java.lang.Exception
- Throws:
java.lang.Exception
testExternallyInstantiatedObjectsCanBeRegistgeredAndLookedUp
public void testExternallyInstantiatedObjectsCanBeRegistgeredAndLookedUp()
throws org.picocontainer.PicoException,
org.picocontainer.PicoInitializationException
- Throws:
org.picocontainer.PicoException
org.picocontainer.PicoInitializationException
testAmbiguousResolution
public void testAmbiguousResolution()
throws org.picocontainer.PicoRegistrationException,
org.picocontainer.PicoInitializationException
- Throws:
org.picocontainer.PicoRegistrationException
org.picocontainer.PicoInitializationException
testLookupWithUnregisteredKeyReturnsNull
public void testLookupWithUnregisteredKeyReturnsNull()
throws org.picocontainer.PicoIntrospectionException,
org.picocontainer.PicoInitializationException,
org.picocontainer.defaults.AssignabilityRegistrationException,
org.picocontainer.defaults.NotConcreteRegistrationException
- Throws:
org.picocontainer.PicoIntrospectionException
org.picocontainer.PicoInitializationException
org.picocontainer.defaults.AssignabilityRegistrationException
org.picocontainer.defaults.NotConcreteRegistrationException
testLookupWithUnregisteredTypeReturnsNull
public void testLookupWithUnregisteredTypeReturnsNull()
throws org.picocontainer.PicoIntrospectionException,
org.picocontainer.PicoInitializationException,
org.picocontainer.defaults.AssignabilityRegistrationException,
org.picocontainer.defaults.NotConcreteRegistrationException
- Throws:
org.picocontainer.PicoIntrospectionException
org.picocontainer.PicoInitializationException
org.picocontainer.defaults.AssignabilityRegistrationException
org.picocontainer.defaults.NotConcreteRegistrationException
testUnsatisfiableDependenciesExceptionGivesVerboseEnoughErrorMessage
public void testUnsatisfiableDependenciesExceptionGivesVerboseEnoughErrorMessage()
testUnsatisfiableDependenciesExceptionGivesUnsatisfiedDependencyTypes
public void testUnsatisfiableDependenciesExceptionGivesUnsatisfiedDependencyTypes()
testCyclicDependencyThrowsCyclicDependencyException
public void testCyclicDependencyThrowsCyclicDependencyException()
assertCyclicDependencyThrowsCyclicDependencyException
private static void assertCyclicDependencyThrowsCyclicDependencyException(org.picocontainer.MutablePicoContainer pico)
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.PicoIntrospectionException
- Throws:
org.picocontainer.PicoIntrospectionException
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.PicoRegistrationException,
org.picocontainer.PicoInitializationException
- Throws:
org.picocontainer.PicoRegistrationException
org.picocontainer.PicoInitializationException
testNoArgConstructorToBeSelected
public void testNoArgConstructorToBeSelected()