|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.testng.Assert org.apache.tapestry5.ioc.test.TestUtils org.apache.tapestry5.ioc.test.TestBase org.apache.tapestry5.ioc.test.IOCTestCase
public class IOCTestCase
Add factory and trainer methods for the public interfaces of Tapestry IOC.
Constructor Summary | |
---|---|
IOCTestCase()
|
Method Summary | ||
---|---|---|
protected Registry |
buildRegistry(Class... moduleClasses)
Builds a Registry for the provided modules; caller should shutdown the Registry when done. |
|
protected Method |
findMethod(Class clazz,
String methodName)
|
|
protected Method |
findMethod(Object subject,
String methodName)
|
|
protected Method |
findMethod(String methodName)
|
|
protected String |
join(String... lines)
Combines a series of lines by forming a string with a line separator after each line. |
|
protected AdvisorDef |
mockAdvisorDef()
|
|
protected AdvisorDef2 |
mockAdvisorDef2()
|
|
protected AnnotationProvider |
mockAnnotationProvider()
|
|
protected ClassPropertyAdapter |
mockClassPropertyAdapter()
|
|
protected
|
mockConfiguration()
|
|
protected ContributionDef |
mockContributionDef()
|
|
protected DecoratorDef |
mockDecoratorDef()
|
|
protected DecoratorDef2 |
mockDecoratorDef2()
|
|
protected Location |
mockLocation()
|
|
protected org.slf4j.Logger |
mockLogger()
|
|
protected
|
mockMappedConfiguration()
|
|
protected MasterObjectProvider |
mockMasterObjectProvider()
|
|
protected MessageFormatter |
mockMessageFormatter()
|
|
protected Messages |
mockMessages()
|
|
protected ModuleDef |
mockModuleDef()
|
|
protected ModuleDef2 |
mockModuleDef2()
|
|
protected ObjectCreator |
mockObjectCreator()
|
|
protected ObjectLocator |
mockObjectLocator()
|
|
protected ObjectProvider |
mockObjectProvider()
|
|
protected
|
mockOrderedConfiguration()
|
|
protected PerthreadManager |
mockPerthreadManager()
|
|
protected PropertyAccess |
mockPropertyAccess()
|
|
protected PropertyAdapter |
mockPropertyAdapter()
|
|
protected Resource |
mockResource()
|
|
protected Runnable |
mockRunnable()
Frequently used as a placeholder for an arbitrary service (but its nice and simple). |
|
protected ServiceBuilderResources |
mockServiceBuilderResources()
|
|
protected ServiceBuilderResources |
mockServiceBuilderResources(OperationTracker tracker)
|
|
protected ServiceDecorator |
mockServiceDecorator()
|
|
protected ServiceDef |
mockServiceDef()
|
|
protected ServiceResources |
mockServiceResources()
|
|
protected ServiceResources |
mockServiceResources(OperationTracker tracker)
|
|
protected SymbolSource |
mockSymbolSource()
|
|
protected ThreadLocale |
mockThreadLocale()
|
|
protected TypeCoercer |
mockTypeCoercer()
|
|
protected IntermediateType |
newIntermediateType()
|
|
protected void |
stub_contains(Messages messages,
boolean contained)
|
|
protected void |
stub_isDebugEnabled(org.slf4j.Logger logger,
boolean enabled)
|
|
protected void |
touch(File f)
Touches the file, changing the last modified time to the current time. |
|
protected
|
train_autobuild(ObjectLocator locator,
Class<T> beanClass,
T instance)
|
|
protected
|
train_coerce(TypeCoercer coercer,
S input,
Class<T> expectedType,
T coercedValue)
|
|
protected void |
train_contains(Messages messages,
String key,
boolean result)
|
|
protected void |
train_createInterceptor(ServiceDecorator decorator,
Object coreObject,
Object interceptor)
|
|
protected void |
train_createObject(ObjectCreator creator,
Object service)
|
|
protected void |
train_expandSymbols(SymbolSource source,
String input)
|
|
protected void |
train_expandSymbols(SymbolSource source,
String input,
String expanded)
|
|
protected void |
train_forFile(Resource resource,
String relativePath,
Resource file)
|
|
protected void |
train_forLocale(Resource base,
Locale locale,
Resource resource)
|
|
protected void |
train_format(MessageFormatter formatter,
String result,
Object... arguments)
Have to put the result before the varargs. |
|
protected void |
train_get(Messages messages,
String key,
String message)
|
|
protected
|
train_getAnnotation(AnnotationProvider annotationProvider,
Class<T> annotationClass,
T annotation)
|
|
protected void |
train_getLocale(ThreadLocale threadLocale,
Locale locale)
|
|
protected void |
train_getLogger(LoggerSource source,
String serviceId,
org.slf4j.Logger logger)
|
|
protected void |
train_getLogger(ServiceResources resources,
org.slf4j.Logger log)
|
|
protected void |
train_getMessageFormatter(Messages messages,
String key,
MessageFormatter formatter)
|
|
protected void |
train_getPath(Resource r,
String path)
|
|
protected
|
train_getService(ObjectLocator locator,
Class<T> serviceInterface,
T service)
|
|
protected
|
train_getService(ObjectLocator locator,
String serviceId,
Class<T> serviceInterface,
T service)
|
|
protected void |
train_getServiceId(ServiceDef def,
String serviceId)
|
|
protected void |
train_getServiceId(ServiceResources resources,
String serviceId)
|
|
protected void |
train_getServiceInterface(ServiceDef def,
Class serviceInterface)
|
|
protected void |
train_getServiceInterface(ServiceResources resources,
Class serviceInterface)
|
|
protected void |
train_getTracker(ServiceResources resources,
OperationTracker tracker)
|
|
protected void |
train_isDebugEnabled(org.slf4j.Logger log,
boolean debugEnabled)
|
|
protected void |
train_isTraceEnabled(org.slf4j.Logger log,
boolean traceEnabled)
|
|
protected void |
train_matches(AdvisorDef advisorDef,
ServiceDef serviceDef,
boolean matches)
|
|
protected void |
train_matches(DecoratorDef decoratorDef,
ServiceDef serviceDef,
boolean matches)
|
|
protected
|
train_provide(ObjectProvider provider,
Class<T> objectType,
AnnotationProvider annotationProvider,
ObjectLocator locator,
T object)
|
|
protected void |
train_toURL(Resource resource,
URL url)
|
|
protected void |
train_value(IntermediateType it,
Class value)
|
|
protected void |
train_valueForSymbol(SymbolSource symbolSource,
String symbolName,
String value)
|
Methods inherited from class org.apache.tapestry5.ioc.test.TestBase |
---|
discardMockControl, expect, getMocksControl, newCapture, newMock, replay, setAnswer, setThrowable, verify |
Methods inherited from class org.apache.tapestry5.ioc.test.TestUtils |
---|
assertArraysEqual, assertListsEquals, assertListsEquals, assertMessageContains, create, get, set, showLists, unreachable |
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, 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 IOCTestCase()
Method Detail |
---|
protected final Registry buildRegistry(Class... moduleClasses)
protected final Method findMethod(Class clazz, String methodName)
protected final Method findMethod(Object subject, String methodName)
protected final Method findMethod(String methodName)
protected final String join(String... lines)
protected final AnnotationProvider mockAnnotationProvider()
protected final <T> Configuration<T> mockConfiguration()
protected final ContributionDef mockContributionDef()
protected final DecoratorDef mockDecoratorDef()
protected final DecoratorDef2 mockDecoratorDef2()
protected final AdvisorDef mockAdvisorDef()
protected final AdvisorDef2 mockAdvisorDef2()
protected final Location mockLocation()
protected final org.slf4j.Logger mockLogger()
protected final void stub_isDebugEnabled(org.slf4j.Logger logger, boolean enabled)
protected final <K,V> MappedConfiguration<K,V> mockMappedConfiguration()
protected final MessageFormatter mockMessageFormatter()
protected final Messages mockMessages()
protected final ModuleDef mockModuleDef()
protected final ModuleDef2 mockModuleDef2()
protected final ObjectCreator mockObjectCreator()
protected final ObjectProvider mockObjectProvider()
protected final <T> OrderedConfiguration<T> mockOrderedConfiguration()
protected final Resource mockResource()
protected final Runnable mockRunnable()
protected final ServiceBuilderResources mockServiceBuilderResources()
protected final ServiceDecorator mockServiceDecorator()
protected final ServiceDef mockServiceDef()
protected final ObjectLocator mockObjectLocator()
protected final ServiceResources mockServiceResources()
protected final SymbolSource mockSymbolSource()
protected final ThreadLocale mockThreadLocale()
protected final TypeCoercer mockTypeCoercer()
protected final void stub_contains(Messages messages, boolean contained)
protected <S,T> void train_coerce(TypeCoercer coercer, S input, Class<T> expectedType, T coercedValue)
protected final void train_contains(Messages messages, String key, boolean result)
protected final void train_createInterceptor(ServiceDecorator decorator, Object coreObject, Object interceptor)
protected final void train_createObject(ObjectCreator creator, Object service)
protected final void train_expandSymbols(SymbolSource source, String input)
protected final void train_expandSymbols(SymbolSource source, String input, String expanded)
protected final void train_forFile(Resource resource, String relativePath, Resource file)
protected final void train_forLocale(Resource base, Locale locale, Resource resource)
protected void train_format(MessageFormatter formatter, String result, Object... arguments)
protected final void train_get(Messages messages, String key, String message)
protected final void train_getLocale(ThreadLocale threadLocale, Locale locale)
protected final void train_getLogger(LoggerSource source, String serviceId, org.slf4j.Logger logger)
protected final void train_getMessageFormatter(Messages messages, String key, MessageFormatter formatter)
protected final void train_getPath(Resource r, String path)
protected final <T> void train_getService(ObjectLocator locator, Class<T> serviceInterface, T service)
protected final <T> void train_getService(ObjectLocator locator, String serviceId, Class<T> serviceInterface, T service)
protected final void train_getServiceId(ServiceDef def, String serviceId)
protected final void train_getServiceId(ServiceResources resources, String serviceId)
protected final void train_getServiceInterface(ServiceDef def, Class serviceInterface)
protected final void train_getServiceInterface(ServiceResources resources, Class serviceInterface)
protected final void train_getLogger(ServiceResources resources, org.slf4j.Logger log)
protected final void train_isDebugEnabled(org.slf4j.Logger log, boolean debugEnabled)
protected final void train_isTraceEnabled(org.slf4j.Logger log, boolean traceEnabled)
protected final void train_matches(DecoratorDef decoratorDef, ServiceDef serviceDef, boolean matches)
protected final void train_matches(AdvisorDef advisorDef, ServiceDef serviceDef, boolean matches)
protected final <T> void train_provide(ObjectProvider provider, Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator, T object)
protected final void train_toURL(Resource resource, URL url)
protected final <T extends Annotation> void train_getAnnotation(AnnotationProvider annotationProvider, Class<T> annotationClass, T annotation)
protected final MasterObjectProvider mockMasterObjectProvider()
protected final void train_value(IntermediateType it, Class value)
protected final IntermediateType newIntermediateType()
protected final PropertyAdapter mockPropertyAdapter()
protected final ClassPropertyAdapter mockClassPropertyAdapter()
protected final PropertyAccess mockPropertyAccess()
protected final <T> void train_autobuild(ObjectLocator locator, Class<T> beanClass, T instance)
protected final PerthreadManager mockPerthreadManager()
protected final ServiceResources mockServiceResources(OperationTracker tracker)
protected final void train_getTracker(ServiceResources resources, OperationTracker tracker)
protected final ServiceBuilderResources mockServiceBuilderResources(OperationTracker tracker)
protected final void train_valueForSymbol(SymbolSource symbolSource, String symbolName, String value)
protected final void touch(File f) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |