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.adapters
Class InstanceAdapterTestCase

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

    public final class InstanceAdapterTestCase

extends AbstractComponentAdapterTest

Test the InstanceAdapter.

Author:
  Jörg Schaible

Nested Class Summary

Nested classes/interfaces inherited from class org.picocontainer.tck.AbstractComponentAdapterTest
`AbstractComponentAdapterTest.CollectingBehavior, AbstractComponentAdapterTest.CycleDetectorBehavior, AbstractComponentAdapterTest.NotInstantiatableBehavior, AbstractComponentAdapterTest.RecordingLifecycleStrategy`

Field Summary

Fields inherited from class org.picocontainer.tck.AbstractComponentAdapterTest
`INSTANTIATING, RESOLVING, SERIALIZABLE, VERIFYING`

Constructor Summary
`InstanceAdapterTestCase()`

Method Summary
`protected int` | `getComponentAdapterNature()`
`protected Class` | `getComponentAdapterType()`
`protected org.picocontainer.ComponentAdapter` | `prepDEF_verifyDoesNotInstantiate(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test verifyDoesNotInstantiate.
`protected org.picocontainer.ComponentAdapter` | `prepDEF_verifyWithoutDependencyWorks(org.picocontainer.MutablePicoContainer picoContainer)` Prepare the test verifyWithoutDependencyWorks.
`protected org.picocontainer.ComponentAdapter` | `prepDEF_visitable()` Prepare the test visitable.
`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.
`void` | `testComponentAdapterCanIgnoreLifecycle()`
`void` | `testComponentAdapterReturnsSame()`
`void` | `testCustomLifecycleCanBeInjected()`
`void` | `testDefaultLifecycleStrategy()`
`void` | `testGuardAgainstNullInstance()`

Methods inherited from class org.picocontainer.tck.AbstractComponentAdapterTest
`createDefaultComponentFactory, prepDEF_isAbleToTakeParameters, prepINS_createsNewInstances, prepINS_errorIsRethrown, prepINS_normalExceptionIsRethrownInsidePicoInitializationException, prepINS_runtimeExceptionIsRethrown, prepRES_dependenciesAreResolved, prepRES_failingInstantiationWithCyclicDependencyException, prepRES_failingVerificationWithCyclicDependencyException, prepVER_verificationFails, testDEF_isAbleToTakeParameters, testDEF_verifyDoesNotInstantiate, testDEF_verifyWithoutDependencyWorks, testDEF_visitable, testINS_createsNewInstances, testINS_errorIsRethrown, testINS_normalExceptionIsRethrownInsidePicoInitializationException, testINS_runtimeExceptionIsRethrown, testRES_dependenciesAreResolved, testRES_failingInstantiationWithCyclicDependencyException, testRES_failingVerificationWithCyclicDependencyException, testSER_isSerializable, testSER_isXStreamSerializable, testSER_isXStreamSerializableWithPureReflection, testVER_verificationFails, wrapComponentInstances`

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

Constructor Detail

### InstanceAdapterTestCase

    public InstanceAdapterTestCase()

Method Detail

### testComponentAdapterReturnsSame

    public void testComponentAdapterReturnsSame()

### testDefaultLifecycleStrategy

    public void testDefaultLifecycleStrategy()

### testCustomLifecycleCanBeInjected

    public void testCustomLifecycleCanBeInjected()

### testComponentAdapterCanIgnoreLifecycle

    public void testComponentAdapterCanIgnoreLifecycle()

### testGuardAgainstNullInstance

    public void testGuardAgainstNullInstance()

### getComponentAdapterType

    protected Class getComponentAdapterType()

  Specified by:
    `getComponentAdapterType` in class `AbstractComponentAdapterTest`
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#getComponentAdapterType()`

### getComponentAdapterNature

    protected int getComponentAdapterNature()

  Overrides:
    `getComponentAdapterNature` in class `AbstractComponentAdapterTest`
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#getComponentAdapterNature()`

### prepDEF_verifyWithoutDependencyWorks

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

  Prepare the test verifyWithoutDependencyWorks.

  Specified by:
    `prepDEF_verifyWithoutDependencyWorks` in class `AbstractComponentAdapterTest`
  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.
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#prepDEF_verifyWithoutDependencyWorks(org.picocontainer.MutablePicoContainer)`

### prepDEF_verifyDoesNotInstantiate

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

  Prepare the test verifyDoesNotInstantiate.

  Specified by:
    `prepDEF_verifyDoesNotInstantiate` in class `AbstractComponentAdapterTest`
  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.
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#prepDEF_verifyDoesNotInstantiate(org.picocontainer.MutablePicoContainer)`

### prepDEF_visitable

    protected org.picocontainer.ComponentAdapter prepDEF_visitable()

  Prepare the test visitable.

  Specified by:
    `prepDEF_visitable` in class `AbstractComponentAdapterTest`
  Returns:
    a ComponentAdapter of the type to test. If the ComponentAdapter supports `Parameter`, you have to select a component, that have some.
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#prepDEF_visitable()`

### prepSER_isSerializable

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

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

  Overrides:
    `prepSER_isSerializable` in class `AbstractComponentAdapterTest`
  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test. Registration in the pico is not necessary.
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#prepSER_isSerializable(org.picocontainer.MutablePicoContainer)`

### prepSER_isXStreamSerializable

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

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

  Overrides:
    `prepSER_isXStreamSerializable` in class `AbstractComponentAdapterTest`
  Parameters:
    `picoContainer` - container, may probably not be used.
  Returns:
    a ComponentAdapter of the type to test. Registration in the pico is not necessary.
  See Also:
    `org.picocontainer.tck.AbstractComponentAdapterTestCase#prepSER_isXStreamSerializable(org.picocontainer.MutablePicoContainer)`

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.