|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.testng.Assert
org.apache.tapestry5.ioc.test.TestBase
org.apache.tapestry5.ioc.test.IOCTestCase
org.apache.tapestry5.ioc.internal.IOCInternalTestCase
public class IOCInternalTestCase
| Constructor Summary | |
|---|---|
IOCInternalTestCase()
|
|
| Method Summary | ||
|---|---|---|
|
autobuild(Class<T> clazz)
Autobuilds a class by finding the public constructor with the most parameters. |
|
void |
cleanupThread()
Invoked at the end of a request to discard any thread-specific information accumulated during the current request. |
|
ClassFactory |
getClassFactory()
|
|
|
getObject(Class<T> objectType,
AnnotationProvider annotationProvider)
Obtains an object indirectly, using the MasterObjectProvider service. |
|
|
getService(Class<T> serviceInterface)
Locates a service given just a service interface. |
|
|
getService(String serviceId,
Class<T> serviceInterface)
Obtains a service via its unique service id. |
|
protected InternalRegistry |
mockInternalRegistry()
|
|
protected Module |
mockModule()
|
|
protected ObjectCreatorSource |
mockObjectCreatorSource()
|
|
protected ServiceActivityTracker |
mockServiceActivityTracker()
|
|
void |
performRegistryStartup()
Invoked to eagerly load services marked with the EagerLoad annotation, and to execute all contributions
to the Startup service. |
|
|
proxy(Class<T> interfaceClass,
Class<? extends T> implementationClass)
Creates a proxy. |
|
void |
setup_registry()
|
|
void |
shutdown_registry()
|
|
void |
shutdown()
Shuts down a Registry instance. |
|
protected void |
train_findDecoratorsForService(InternalRegistry registry)
|
|
protected void |
train_getDescription(ObjectCreatorSource source,
String description)
|
|
protected
|
train_getService(InternalRegistry registry,
String serviceId,
Class<T> serviceInterface,
T service)
|
|
| Methods inherited from class org.apache.tapestry5.ioc.test.TestBase |
|---|
assertArraysEqual, assertListsEquals, assertListsEquals, assertMessageContains, create, discardMockControl, expect, get, getMocksControl, newCapture, newMock, replay, set, setAnswer, setThrowable, unreachable, verify |
| Methods inherited from class org.testng.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsNoOrder, assertEqualsNoOrder, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOCInternalTestCase()
| Method Detail |
|---|
public final void cleanupThread()
Registry
cleanupThread in interface RegistryPerthreadManager,
ThreadCleanupListenerpublic final ClassFactory getClassFactory()
public final <T> T getObject(Class<T> objectType,
AnnotationProvider annotationProvider)
ObjectLocatorMasterObjectProvider service.
getObject in interface ObjectLocatorobjectType - the type of object to be returnedannotationProvider - provides access to annotations on the field or parameter for which a value is to be
obtained, which may be utilized in selecting an appropriate object, use
null when annotations are not available (in which case, selection will
be based only on the object type)
ObjectProviderpublic final <T> T getService(Class<T> serviceInterface)
ObjectLocator
getService in interface ObjectLocatorserviceInterface - the interface the service implements
public final <T> T getService(String serviceId,
Class<T> serviceInterface)
ObjectLocator
getService in interface ObjectLocatorserviceId - unique Service id used to locate the service object (may contain symbols, which
will be expanded), case is ignoredserviceInterface - the interface implemented by the service (or an interface extended by the service
interface)
public final <T> T autobuild(Class<T> clazz)
ObjectLocator
autobuild in interface ObjectLocatorclazz - the type of object to instantiate
MasterObjectProviderpublic final void performRegistryStartup()
RegistryEagerLoad annotation, and to execute all contributions
to the Startup service.
performRegistryStartup in interface Registry
public <T> T proxy(Class<T> interfaceClass,
Class<? extends T> implementationClass)
ObjectLocatorObjectLocator.autobuild(Class) until just-in-time (that is, first
method invocation). In a limited number of cases, it is necessary to use such a proxy to prevent service
construction cycles, particularly when contributing (directly or indirectly) to the MasterObjectProvider (which is itself at the heart of autobuilding).
proxy in interface ObjectLocatorinterfaceClass - the interface implemented by the proxyimplementationClass - a concrete class that implements the interface
public final void setup_registry()
public final void shutdown()
Registry
shutdown in interface RegistryRegistryShutdownHub,
RegistryShutdownListenerpublic final void shutdown_registry()
protected final InternalRegistry mockInternalRegistry()
protected final Module mockModule()
protected final ObjectCreatorSource mockObjectCreatorSource()
protected final void train_findDecoratorsForService(InternalRegistry registry)
protected final void train_getDescription(ObjectCreatorSource source,
String description)
protected final <T> void train_getService(InternalRegistry registry,
String serviceId,
Class<T> serviceInterface,
T service)
protected ServiceActivityTracker mockServiceActivityTracker()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||