Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.picocontainer.tck
Class AbstractComponentAdapterTest

    java.lang.Object
      org.picocontainer.tck.AbstractComponentAdapterTest

Direct Known Subclasses:
  ConstructorInjectorTestCase, InstanceAdapterTestCase, SetterInjectorTestCase

    public abstract class AbstractComponentAdapterTest

extends Object

Test suite for a ComponentAdapter implementation.

Author:
  Jörg Schaible

Nested Class Summary
`static class` | `AbstractComponentAdapterTest.CollectingBehavior`
`static class` | `AbstractComponentAdapterTest.CycleDetectorBehavior`
`static class` | `AbstractComponentAdapterTest.NotInstantiatableBehavior`
`static class` | `AbstractComponentAdapterTest.RecordingLifecycleStrategy`

Field Summary
`static int` | `INSTANTIATING`
`static int` | `RESOLVING`
`static int` | `SERIALIZABLE`
`static int` | `VERIFYING`

Constructor Summary
`AbstractComponentAdapterTest()`

Method Summary
`protected org.picocontainer.ComponentFactory` | `createDefaultComponentFactory()`
`protected int` | `getComponentAdapterNature()`
`protected abstract Class` | `getComponentAdapterType()`
`protected org.picocontainer.ComponentAdapter` | `prepDEF_isAbleToTakeParameters(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test isAbleToTakeParameters.
`protected abstract org.picocontainer.ComponentAdapter` | `prepDEF_verifyDoesNotInstantiate(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test verifyDoesNotInstantiate.
`protected abstract org.picocontainer.ComponentAdapter` | `prepDEF_verifyWithoutDependencyWorks(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test verifyWithoutDependencyWorks.
`protected abstract org.picocontainer.ComponentAdapter` | `prepDEF_visitable()` Prepare the test visitable.
`protected org.picocontainer.ComponentAdapter` | `prepINS_createsNewInstances(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test createsNewInstances.
`protected org.picocontainer.ComponentAdapter` | `prepINS_errorIsRethrown(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test errorIsRethrown.
`protected org.picocontainer.ComponentAdapter` | `prepINS_normalExceptionIsRethrownInsidePicoInitializationException(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test normalExceptionIsRethrownInsidePicoInvocationTargetInitializationException.
`protected org.picocontainer.ComponentAdapter` | `prepINS_runtimeExceptionIsRethrown(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test runtimeExceptionIsRethrown.
`protected org.picocontainer.ComponentAdapter` | `prepRES_dependenciesAreResolved(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test dependenciesAreResolved.
`protected org.picocontainer.ComponentAdapter` | `prepRES_failingInstantiationWithCyclicDependencyException(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test failingInstantiationWithCyclicDependencyException.
`protected org.picocontainer.ComponentAdapter` | `prepRES_failingVerificationWithCyclicDependencyException(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test failingVerificationWithCyclicDependencyException.
`protected org.picocontainer.ComponentAdapter` | `prepSER_isSerializable(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test isSerializable.
`protected org.picocontainer.ComponentAdapter` | `prepSER_isXStreamSerializable(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test isXStreamSerializable.
`protected org.picocontainer.ComponentAdapter` | `prepVER_verificationFails(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test verificationFailsWithUnsatisfiedDependency.
`void` | `testDEF_isAbleToTakeParameters()`
`void` | `testDEF_verifyDoesNotInstantiate()`
`void` | `testDEF_verifyWithoutDependencyWorks()`
`void` | `testDEF_visitable()`
`void` | `testINS_createsNewInstances()`
`void` | `testINS_errorIsRethrown()`
`void` | `testINS_normalExceptionIsRethrownInsidePicoInitializationException()`
`void` | `testINS_runtimeExceptionIsRethrown()`
`void` | `testRES_dependenciesAreResolved()`
`void` | `testRES_failingInstantiationWithCyclicDependencyException()`
`void` | `testRES_failingVerificationWithCyclicDependencyException()`
`void` | `testSER_isSerializable()`
`void` | `testSER_isXStreamSerializable()`
`void` | `testSER_isXStreamSerializableWithPureReflection()`
`void` | `testVER_verificationFails()`
`protected org.picocontainer.PicoContainer` | `wrapComponentInstances(Class decoratingComponentAdapterClass, org.picocontainer.PicoContainer picoContainer, Object[] wrapperDependencies)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SERIALIZABLE

    public static final int SERIALIZABLE

See Also:
  Constant Field Values

### VERIFYING

    public static final int VERIFYING

See Also:
  Constant Field Values

### INSTANTIATING

    public static final int INSTANTIATING

See Also:
  Constant Field Values

### RESOLVING

    public static final int RESOLVING

See Also:
  Constant Field Values

Constructor Detail

### AbstractComponentAdapterTest

    public AbstractComponentAdapterTest()

Method Detail

### getComponentAdapterType

    protected abstract Class getComponentAdapterType()

### getComponentAdapterNature

    protected int getComponentAdapterNature()

### createDefaultComponentFactory

    protected org.picocontainer.ComponentFactory createDefaultComponentFactory()

### prepDEF_verifyWithoutDependencyWorks

    protected abstract org.picocontainer.ComponentAdapter prepDEF_verifyWithoutDependencyWorks(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test verifyWithoutDependencyWorks.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test for a component without dependencies. Registration in the pico is not necessary.

### testDEF_verifyWithoutDependencyWorks

    public final void testDEF_verifyWithoutDependencyWorks()

### prepDEF_verifyDoesNotInstantiate

    protected abstract org.picocontainer.ComponentAdapter prepDEF_verifyDoesNotInstantiate(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test verifyDoesNotInstantiate.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test for a component that may throw on instantiation. Registration in the pico is not necessary.

### testDEF_verifyDoesNotInstantiate

    public final void testDEF_verifyDoesNotInstantiate()

### prepDEF_visitable

    protected abstract org.picocontainer.ComponentAdapter prepDEF_visitable()

  Prepare the test visitable.

  Returns:
    a ComponentAdapter of the type to test. If the ComponentAdapter supports `Parameter`, you have to select a component, that have some.

### testDEF_visitable

    public final void testDEF_visitable()

### prepDEF_isAbleToTakeParameters

    protected org.picocontainer.ComponentAdapter prepDEF_isAbleToTakeParameters(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test isAbleToTakeParameters. Overload this function, if the ComponentAdapter to test supports `Parameter`.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test. Select a component, that has some parameters. Registration in the pico is not necessary.

### testDEF_isAbleToTakeParameters

    public final void testDEF_isAbleToTakeParameters()

### prepSER_isSerializable

    protected org.picocontainer.ComponentAdapter prepSER_isSerializable(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test isSerializable. Overload this function, if the ComponentAdapter supports serialization.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test. Registration in the pico is not necessary.

### testSER_isSerializable

    public final void testSER_isSerializable()
                                      throws IOException,
                                             ClassNotFoundException

  Throws:
    `IOException`
    `ClassNotFoundException`

### prepSER_isXStreamSerializable

    protected org.picocontainer.ComponentAdapter prepSER_isXStreamSerializable(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test isXStreamSerializable. Overload this function, if the ComponentAdapter supports serialization.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test. Registration in the pico is not necessary.

### testSER_isXStreamSerializableWithPureReflection

    public final void testSER_isXStreamSerializableWithPureReflection()

### testSER_isXStreamSerializable

    public final void testSER_isXStreamSerializable()

### prepVER_verificationFails

    protected org.picocontainer.ComponentAdapter prepVER_verificationFails(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test verificationFailsWithUnsatisfiedDependency. Overload this function, if the ComponentAdapter's verification can fail e.g. due to an unresolved dependency.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test, that fails for the verification, e.g. because of a compoennt with missing dependencies. Registration in the pico is not necessary.

### testVER_verificationFails

    public final void testVER_verificationFails()

### prepINS_createsNewInstances

    protected org.picocontainer.ComponentAdapter prepINS_createsNewInstances(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test createsNewInstances. Overload this function, if the ComponentAdapter is instantiating. It should create a new instance with every call.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test. Registration in the pico is not necessary.

### testINS_createsNewInstances

    public final void testINS_createsNewInstances()

### prepINS_errorIsRethrown

    protected org.picocontainer.ComponentAdapter prepINS_errorIsRethrown(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test errorIsRethrown. Overload this function, if the ComponentAdapter is instantiating.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test with a component that fails with an `Error` at instantiation. Registration in the pico is not necessary.

### testINS_errorIsRethrown

    public final void testINS_errorIsRethrown()

### prepINS_runtimeExceptionIsRethrown

    protected org.picocontainer.ComponentAdapter prepINS_runtimeExceptionIsRethrown(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test runtimeExceptionIsRethrown. Overload this function, if the ComponentAdapter is instantiating.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test with a component that fails with a `RuntimeException` at instantiation. Registration in the pico is not necessary.

### testINS_runtimeExceptionIsRethrown

    public final void testINS_runtimeExceptionIsRethrown()

### prepINS_normalExceptionIsRethrownInsidePicoInitializationException

    protected org.picocontainer.ComponentAdapter prepINS_normalExceptionIsRethrownInsidePicoInitializationException(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test normalExceptionIsRethrownInsidePicoInvocationTargetInitializationException. Overload this function, if the ComponentAdapter is instantiating.

  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test with a component that fails with a `PicoCompositionException` at instantiation. Registration in the pico is not necessary.

### testINS_normalExceptionIsRethrownInsidePicoInitializationException

    public final void testINS_normalExceptionIsRethrownInsidePicoInitializationException()

### prepRES_dependenciesAreResolved

    protected org.picocontainer.ComponentAdapter prepRES_dependenciesAreResolved(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test dependenciesAreResolved. Overload this function, if the ComponentAdapter is resolves dependencies.

  Parameters:
    `picoContainer` - container, used to register dependencies.
  Returns:
    a ComponentAdapter of the type to test with a component that has dependencies. Registration in the pico is not necessary.

### testRES_dependenciesAreResolved

    public final void testRES_dependenciesAreResolved()

### prepRES_failingVerificationWithCyclicDependencyException

    protected org.picocontainer.ComponentAdapter prepRES_failingVerificationWithCyclicDependencyException(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test failingVerificationWithCyclicDependencyException. Overload this function, if the ComponentAdapter is resolves dependencies.

  Parameters:
    `picoContainer` - container, used to register dependencies.
  Returns:
    a ComponentAdapter of the type to test with a component that has cyclic dependencies. You have to register the component itself in the pico.

### testRES_failingVerificationWithCyclicDependencyException

    public final void testRES_failingVerificationWithCyclicDependencyException()

### prepRES_failingInstantiationWithCyclicDependencyException

    protected org.picocontainer.ComponentAdapter prepRES_failingInstantiationWithCyclicDependencyException(org.picocontainer.MutablePicoContainer picoContainer)

  Prepare the test failingInstantiationWithCyclicDependencyException. Overload this function, if the ComponentAdapter is resolves dependencies.

  Parameters:
    `picoContainer` - container, used to register dependencies.
  Returns:
    a ComponentAdapter of the type to test with a component that has cyclic dependencies. You have to register the component itself in the pico.

### testRES_failingInstantiationWithCyclicDependencyException

    public final void testRES_failingInstantiationWithCyclicDependencyException()

### wrapComponentInstances

    protected final org.picocontainer.PicoContainer wrapComponentInstances(Class decoratingComponentAdapterClass,
                                                                           org.picocontainer.PicoContainer picoContainer,
                                                                           Object[] wrapperDependencies)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 Codehaus. All Rights Reserved.