org.apache.tapestry5.test
Class TapestryTestCase

java.lang.Object
  extended by org.testng.Assert
      extended by org.apache.tapestry5.ioc.test.TestUtils
          extended by org.apache.tapestry5.ioc.test.TestBase
              extended by org.apache.tapestry5.ioc.test.IOCTestCase
                  extended by org.apache.tapestry5.test.TapestryTestCase

public abstract class TapestryTestCase
extends IOCTestCase

Base test case that adds a number of convenience factory and training methods for the public interfaces of Tapestry.


Constructor Summary
TapestryTestCase()
           
 
Method Summary
protected  MarkupWriter createMarkupWriter()
          Creates a new markup writer instance (not a markup writer mock).
protected  Messages messagesFor(Class componentClass)
          Provides access to component messages, suitable for testing.
protected  ApplicationStateCreator mockApplicationStateCreator()
           
protected  ApplicationStateManager mockApplicationStateManager()
           
protected  ApplicationStatePersistenceStrategy mockApplicationStatePersistenceStrategy()
           
protected  ApplicationStatePersistenceStrategySource mockApplicationStatePersistenceStrategySource()
           
protected  Asset mockAsset()
           
protected  Asset mockAsset(String assetURL)
           
protected  Asset2 mockAsset2()
           
protected  AssetFactory mockAssetFactory()
           
protected  AssetSource mockAssetSource()
           
protected  BaseURLSource mockBaseURLSource()
           
protected  BeanModel mockBeanModel()
           
protected  BeanModelSource mockBeanModelSource()
           
protected  Binding mockBinding()
           
protected  BindingFactory mockBindingFactory()
           
protected  BindingSource mockBindingSource()
           
protected  Block mockBlock()
           
protected  ClasspathAssetAliasManager mockClasspathAssetAliasManager()
           
protected  ClassTransformation mockClassTransformation()
           
protected  Component mockComponent()
           
protected  ComponentClassResolver mockComponentClassResolver()
           
protected  ComponentEventCallback mockComponentEventHandler()
           
protected  ComponentEventRequestHandler mockComponentEventRequestHandler()
           
protected  ComponentEventResultProcessor mockComponentEventResultProcessor()
           
protected  ComponentModel mockComponentModel()
           
protected  ComponentRequestHandler mockComponentRequestHandler()
           
protected  ComponentResources mockComponentResources()
           
protected  Context mockContext()
           
protected  Environment mockEnvironment()
           
protected  Field mockField()
           
protected  FieldTranslator mockFieldTranslator()
           
protected  FieldValidationSupport mockFieldValidationSupport()
           
protected  FieldValidator mockFieldValidator()
           
protected  FieldValidatorSource mockFieldValidatorSource()
           
protected  Field mockFieldWithLabel(String label)
           
protected  FormSupport mockFormSupport()
           
protected  Heartbeat mockHeartbeat()
           
protected  HttpServletRequest mockHttpServletRequest()
           
protected  HttpServletRequestHandler mockHttpServletRequestHandler()
           
protected  HttpServletResponse mockHttpServletResponse()
           
protected  HttpSession mockHttpSession()
           
protected  Inject mockInject()
           
protected  JavaScriptSupport mockJavaScriptSupport()
           
protected  Link mockLink()
           
protected  Link mockLink(String absoluteURI)
           
protected  MarkupWriter mockMarkupWriter()
           
protected  MetaDataLocator mockMetaDataLocator()
           
protected  MutableComponentModel mockMutableComponentModel()
           
protected  NullFieldStrategy mockNullFieldStrategy()
           
protected  PageRenderLinkSource mockPageRenderLinkSource()
           
protected  ParameterModel mockParameterModel()
           
protected  Path mockPath()
           
protected  PropertyConduit mockPropertyConduit()
           
protected  PropertyModel mockPropertyModel()
           
protected  PropertyOverrides mockPropertyOverrides()
           
protected  Request mockRequest()
           
protected  RequestGlobals mockRequestGlobals()
           
protected  RequestHandler mockRequestHandler()
           
protected  ResourceDigestGenerator mockResourceDigestGenerator()
           
protected  Response mockResponse()
           
protected  Session mockSession()
           
protected  Translator mockTranslator()
           
protected  Translator mockTranslator(String name, Class type)
           
protected  TranslatorSource mockTranslatorSource()
           
protected  ValidationConstraintGenerator mockValidationConstraintGenerator()
           
protected  ValidationDecorator mockValidationDecorator()
           
protected  ValidationTracker mockValidationTracker()
           
protected  Validator mockValidator()
           
protected  ValueEncoder mockValueEncoder()
           
protected  ValueEncoderSource mockValueEncoderSource()
           
protected  void train_buildConstraints(ValidationConstraintGenerator generator, Class propertyType, AnnotationProvider provider, String... constraints)
           
protected
<T> void
train_create(ApplicationStateCreator<T> creator, T aso)
           
protected  void train_createAsset(AssetFactory factory, Resource resource, Asset asset)
           
protected  void train_createDefaultTranslator(FieldTranslatorSource source, ComponentResources resources, String parameterName, FieldTranslator translator)
           
protected  void train_createEditModel(BeanModelSource source, Class beanClass, Messages messages, BeanModel model)
           
protected  void train_createValidator(FieldValidatorSource source, Field field, String validatorType, String constraintValue, String overrideId, Messages overrideMessages, Locale locale, FieldValidator result)
           
protected  void train_encodeRedirectURL(Response response, String URI, String encoded)
           
protected  void train_encodeURL(Response response, String inputURL, String outputURL)
           
protected
<T> void
train_exists(ApplicationStatePersistenceStrategy strategy, Class<T> asoClass, boolean exists)
           
protected  void train_findByType(TranslatorSource ts, Class propertyType, Translator translator)
           
protected
<T> void
train_findMeta(MetaDataLocator locator, String key, ComponentResources resources, Class<T> expectedType, T value)
           
protected  void train_generateChecksum(ResourceDigestGenerator generator, URL url, String digest)
           
protected
<T> void
train_get(ApplicationStateManager manager, Class<T> asoClass, T aso)
           
protected
<T> void
train_get(ApplicationStatePersistenceStrategy strategy, Class<T> asoClass, ApplicationStateCreator<T> creator, T aso)
           
protected  void train_get(ApplicationStatePersistenceStrategySource source, String strategyName, ApplicationStatePersistenceStrategy strategy)
           
protected  void train_get(Binding binding, Object value)
           
protected  void train_get(TranslatorSource translatorSource, String name, Translator translator)
           
protected
<T extends Annotation>
void
train_getAnnotation(TransformField field, Class<T> annotationClass, T anotation)
           
protected  void train_getAsset(AssetSource source, Resource root, String path, Locale locale, Asset asset)
           
protected  void train_getAttribute(HttpSession session, String attributeName, Object value)
           
protected  void train_getAttribute(Request request, String attibuteName, Object value)
           
protected  void train_getAttribute(Session session, String name, Object attribute)
           
protected  void train_getAttributeNames(Session session, String prefix, String... names)
           
protected  void train_getBaseResource(ComponentModel model, Resource resource)
           
protected  void train_getBaseURL(BaseURLSource baseURLSource, boolean secure, String baseURL)
           
protected  void train_getBlockParameter(ComponentResources resources, String name, Block block)
           
protected  void train_getBoundType(ComponentResources resources, String parameterName, Class type)
           
protected  void train_getClassName(ClassTransformation transformation, String className)
           
protected  void train_getClasspathAsset(AssetSource source, String path, Asset asset)
           
protected  void train_getClasspathAsset(AssetSource source, String path, Locale locale, Asset asset)
           
protected  void train_getClientId(ClientElement element, String clientId)
           
protected  void train_getCompleteId(ComponentResourcesCommon resources, String completeId)
           
protected  void train_getComponent(ComponentResources resources, Component component)
           
protected  void train_getComponentClassName(ComponentModel model, String className)
           
protected  void train_getComponentResources(Component component, ComponentResources resources)
           
protected  void train_getConduit(PropertyModel model, PropertyConduit conduit)
           
protected
<C,T> void
train_getConstraintType(Validator<C,T> validator, Class<C> constraintType)
           
protected  void train_getContainer(ComponentResources resources, Component container)
           
protected  void train_getContainerMessages(ComponentResources resources, Messages containerMessages)
           
protected  void train_getContainerResources(ComponentResources resources, ComponentResources containerResources)
           
protected  void train_getDateHeader(Request request, String name, long value)
           
protected  void train_getFieldPersistenceStrategy(ComponentModel model, String fieldName, String fieldStrategy)
           
protected  void train_getFormComponentId(FormSupport formSupport, String componentId)
           
protected  void train_getFormValidationId(FormSupport formSupport, String validationId)
           
protected  void train_getId(ComponentResources resources, String id)
           
protected  void train_getInheritInformalParameters(EmbeddedComponentModel model, boolean inherits)
           
protected  void train_getInput(ValidationTracker tracker, Field field, String input)
           
protected  void train_getLabel(Field field, String label)
           
 void train_getLine(Location location, int line)
           
protected  void train_getLocale(ComponentResourcesCommon resources, Locale locale)
           
protected  void train_getLocale(Request request, Locale locale)
           
 void train_getLocation(Locatable locatable, Location location)
           
protected  void train_getMessageKey(Translator translator, String messageKey)
           
protected  void train_getMessageKey(Validator validator, String messageKey)
           
protected  void train_getMessages(ComponentResources resources, Messages messages)
           
protected  void train_getMeta(ComponentModel model, String key, String value)
           
protected  void train_getName(TransformField field, String name)
           
protected  void train_getName(Translator translator, String name)
           
protected  void train_getOutputStream(HttpServletResponse response, ServletOutputStream stream)
           
protected  void train_getOverrideBlock(PropertyOverrides overrides, String name, Block block)
           
protected  void train_getOverrideMessages(PropertyOverrides overrides, Messages messages)
           
protected  void train_getPage(ComponentResources resources, Component page)
           
protected  void train_getPageName(ComponentResourcesCommon resources, String pageName)
           
protected  void train_getParameter(Request request, String elementName, String value)
           
protected  void train_getParameterModel(ComponentModel model, String parameterName, ParameterModel parameterModel)
           
protected  void train_getParameterNames(ComponentModel model, String... names)
           
protected  void train_getParentModel(ComponentModel model, ComponentModel parentModel)
           
protected  void train_getPath(Request request, String path)
           
protected  void train_getPathInfo(HttpServletRequest request, String pathInfo)
           
protected  void train_getPersistentFieldNames(ComponentModel model, String... names)
           
 void train_getResource(Location location, Resource resource)
           
protected  void train_getRootResource(AssetFactory factory, Resource rootResource)
           
protected  void train_getServletPath(HttpServletRequest request, String path)
           
protected  void train_getSession(HttpServletRequest request, boolean create, HttpSession session)
           
protected  void train_getSession(Request request, boolean create, Session session)
           
protected  void train_getSupportsInformalParameters(ComponentModel model, boolean supports)
           
protected  void train_getType(TransformField field, String type)
           
protected  void train_getType(Translator translator, Class type)
           
protected  void train_getValueEncoder(ValueEncoderSource source, Class type, ValueEncoder valueEncoder)
           
protected  void train_getValueType(Validator validator, Class valueType)
           
protected  void train_handleResult(ComponentEventCallback handler, Object result, boolean abort)
           
protected  void train_inError(ValidationTracker tracker, Field field, boolean inError)
           
protected  void train_isAllowNull(ParameterModel model, boolean allowNull)
           
protected  void train_isDisabled(Field field, boolean disabled)
           
protected  void train_isInvalidated(Session session, boolean invalidated)
           
protected  void train_isInvariant(Binding binding, boolean isInvariant)
           
protected  void train_isRequired(Field field, boolean required)
           
protected  void train_isRequired(ParameterModel model, boolean isRequired)
           
protected  void train_isRequired(Validator validator, boolean isRequired)
           
protected  void train_isRootClass(MutableComponentModel model, boolean isRootClass)
           
protected  void train_isSecure(Request request, boolean isSecure)
           
protected  void train_isXHR(Request request, boolean isXHR)
           
protected  void train_matchFields(ClassTransformation transformation, TransformField field)
           
protected  void train_name(Parameter parameter, String name)
           
protected  void train_newBinding(BindingFactory factory, String description, ComponentResources container, ComponentResources component, String expression, Location l, Binding binding)
           
protected  void train_newBinding(BindingSource bindingSource, String description, ComponentResources componentResources, String defaultBindingPrefix, String expression, Binding binding)
           
protected  void train_newMemberName(ClassTransformation transformation, String suggested, String name)
           
protected  void train_newMemberName(ClassTransformation transformation, String prefix, String baseName, String name)
           
protected
<T> void
train_peek(Environment env, Class<T> type, T value)
           
protected
<T> void
train_peekRequired(Environment env, Class<T> type, T value)
           
protected  void train_provideInjection(InjectionProvider provider, String fieldName, Class fieldType, ObjectLocator locator, ClassTransformation transformation, MutableComponentModel model, boolean result)
           
protected  void train_renderInformalParameters(ComponentResources resources, MarkupWriter writer, Object... informals)
           
protected  void train_requiresDigest(ResourceDigestGenerator generator, String path, boolean requiresDigest)
           
protected  void train_service(HttpServletRequestHandler handler, HttpServletRequest request, HttpServletResponse response, boolean result)
           
protected  void train_service(RequestHandler handler, Request request, Response response, boolean result)
           
protected  void train_setContentLength(HttpServletResponse response, int length)
           
protected  void train_setContentType(HttpServletResponse response, String contentType)
           
protected  void train_setDateHeader(HttpServletResponse response, String headerName, long date)
           
protected  void train_toClass(ClassTransformation transformation, String type, Class classForType)
           
protected  void train_toClient(ValueEncoder valueEncoder, Object value, String encoded)
           
protected  void train_toClientURL(Asset asset, String URL)
           
protected  void train_toClientURL(ClasspathAssetAliasManager manager, String resourcePath, String clientURL)
           
protected  void train_toRedirectURI(Link link, String URI)
           
protected  void train_toURI(Link link, String URI)
           
protected  void train_toValue(ValueEncoder valueEncoder, String clientValue, Object value)
           
protected  void train_value(Id annotation, String value)
           
protected  void train_value(Path annotation, String value)
           
 
Methods inherited from class org.apache.tapestry5.ioc.test.IOCTestCase
buildRegistry, findMethod, findMethod, findMethod, join, mockAdvisorDef, mockAdvisorDef2, mockAnnotationProvider, mockClassPropertyAdapter, mockConfiguration, mockContributionDef, mockDecoratorDef, mockDecoratorDef2, mockLocation, mockLogger, mockMappedConfiguration, mockMasterObjectProvider, mockMessageFormatter, mockMessages, mockModuleDef, mockModuleDef2, mockObjectCreator, mockObjectLocator, mockObjectProvider, mockOrderedConfiguration, mockPerthreadManager, mockPropertyAccess, mockPropertyAdapter, mockResource, mockRunnable, mockServiceBuilderResources, mockServiceBuilderResources, mockServiceDecorator, mockServiceDef, mockServiceResources, mockServiceResources, mockSymbolSource, mockThreadLocale, mockTypeCoercer, newIntermediateType, stub_contains, stub_isDebugEnabled, touch, train_autobuild, train_coerce, train_contains, train_createInterceptor, train_createObject, train_expandSymbols, train_expandSymbols, train_forFile, train_forLocale, train_format, train_get, train_getAnnotation, train_getLocale, train_getLogger, train_getLogger, train_getMessageFormatter, train_getPath, train_getService, train_getService, train_getServiceId, train_getServiceId, train_getServiceInterface, train_getServiceInterface, train_getTracker, train_isDebugEnabled, train_isTraceEnabled, train_matches, train_matches, train_provide, train_toURL, train_value, train_valueForSymbol
 
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

TapestryTestCase

public TapestryTestCase()
Method Detail

createMarkupWriter

protected final MarkupWriter createMarkupWriter()
Creates a new markup writer instance (not a markup writer mock). Output can be directed at the writer, which uses the default (HTML) markup model. The writer's toString() value represents all the collected markup in the writer.


mockApplicationStateCreator

protected final ApplicationStateCreator mockApplicationStateCreator()

mockApplicationStatePersistenceStrategy

protected final ApplicationStatePersistenceStrategy mockApplicationStatePersistenceStrategy()

mockApplicationStatePersistenceStrategySource

protected final ApplicationStatePersistenceStrategySource mockApplicationStatePersistenceStrategySource()

mockAsset

protected final Asset mockAsset()

mockAssetFactory

protected final AssetFactory mockAssetFactory()

mockAssetSource

protected final AssetSource mockAssetSource()

mockBinding

protected final Binding mockBinding()

mockBindingFactory

protected final BindingFactory mockBindingFactory()

mockBindingSource

protected final BindingSource mockBindingSource()

mockBlock

protected final Block mockBlock()

mockClasspathAssetAliasManager

protected final ClasspathAssetAliasManager mockClasspathAssetAliasManager()

mockClassTransformation

protected final ClassTransformation mockClassTransformation()

mockComponent

protected final Component mockComponent()

mockComponentClassResolver

protected final ComponentClassResolver mockComponentClassResolver()

mockComponentEventHandler

protected final ComponentEventCallback mockComponentEventHandler()

mockComponentModel

protected final ComponentModel mockComponentModel()

mockComponentResources

protected final ComponentResources mockComponentResources()

mockContext

protected final Context mockContext()

mockEnvironment

protected final Environment mockEnvironment()

mockField

protected final Field mockField()

mockFieldValidator

protected final FieldValidator mockFieldValidator()

mockFieldValidatorSource

protected FieldValidatorSource mockFieldValidatorSource()

mockFieldWithLabel

protected final Field mockFieldWithLabel(String label)

mockHeartbeat

protected final Heartbeat mockHeartbeat()

mockHttpServletRequest

protected final HttpServletRequest mockHttpServletRequest()

mockHttpServletResponse

protected final HttpServletResponse mockHttpServletResponse()

mockHttpSession

protected final HttpSession mockHttpSession()

mockInject

protected final Inject mockInject()

mockLink

protected final Link mockLink()

mockMarkupWriter

protected final MarkupWriter mockMarkupWriter()

mockMutableComponentModel

protected final MutableComponentModel mockMutableComponentModel()

mockParameterModel

protected final ParameterModel mockParameterModel()

mockPath

protected final Path mockPath()

mockPropertyConduit

protected final PropertyConduit mockPropertyConduit()

mockPropertyModel

protected final PropertyModel mockPropertyModel()

mockRequest

protected final Request mockRequest()

mockRequestHandler

protected final RequestHandler mockRequestHandler()

mockResourceDigestGenerator

protected final ResourceDigestGenerator mockResourceDigestGenerator()

mockResponse

protected final Response mockResponse()

mockSession

protected final Session mockSession()

mockTranslator

protected final Translator mockTranslator()

mockValidationConstraintGenerator

protected final ValidationConstraintGenerator mockValidationConstraintGenerator()

mockValidationTracker

protected final ValidationTracker mockValidationTracker()

mockValidator

protected final Validator mockValidator()

train_buildConstraints

protected final void train_buildConstraints(ValidationConstraintGenerator generator,
                                            Class propertyType,
                                            AnnotationProvider provider,
                                            String... constraints)

train_create

protected final <T> void train_create(ApplicationStateCreator<T> creator,
                                      T aso)

train_createAsset

protected final void train_createAsset(AssetFactory factory,
                                       Resource resource,
                                       Asset asset)

train_createValidator

protected final void train_createValidator(FieldValidatorSource source,
                                           Field field,
                                           String validatorType,
                                           String constraintValue,
                                           String overrideId,
                                           Messages overrideMessages,
                                           Locale locale,
                                           FieldValidator result)

train_encodeRedirectURL

protected final void train_encodeRedirectURL(Response response,
                                             String URI,
                                             String encoded)

train_encodeURL

protected final void train_encodeURL(Response response,
                                     String inputURL,
                                     String outputURL)

train_exists

protected final <T> void train_exists(ApplicationStatePersistenceStrategy strategy,
                                      Class<T> asoClass,
                                      boolean exists)

train_getAsset

protected final void train_getAsset(AssetSource source,
                                    Resource root,
                                    String path,
                                    Locale locale,
                                    Asset asset)

train_matchFields

protected final void train_matchFields(ClassTransformation transformation,
                                       TransformField field)

train_getName

protected final void train_getName(TransformField field,
                                   String name)

train_getAnnotation

protected final <T extends Annotation> void train_getAnnotation(TransformField field,
                                                                Class<T> annotationClass,
                                                                T anotation)

train_generateChecksum

protected final void train_generateChecksum(ResourceDigestGenerator generator,
                                            URL url,
                                            String digest)

train_get

protected final <T> void train_get(ApplicationStatePersistenceStrategy strategy,
                                   Class<T> asoClass,
                                   ApplicationStateCreator<T> creator,
                                   T aso)

train_get

protected final void train_get(ApplicationStatePersistenceStrategySource source,
                               String strategyName,
                               ApplicationStatePersistenceStrategy strategy)

train_get

protected final void train_get(Binding binding,
                               Object value)

train_getAttribute

protected void train_getAttribute(HttpSession session,
                                  String attributeName,
                                  Object value)

train_getAttribute

protected final void train_getAttribute(Session session,
                                        String name,
                                        Object attribute)

train_getAttributeNames

protected final void train_getAttributeNames(Session session,
                                             String prefix,
                                             String... names)

train_getBaseResource

protected final void train_getBaseResource(ComponentModel model,
                                           Resource resource)

train_getClassName

protected final void train_getClassName(ClassTransformation transformation,
                                        String className)

train_getClasspathAsset

protected final void train_getClasspathAsset(AssetSource source,
                                             String path,
                                             Asset asset)

train_getClasspathAsset

protected final void train_getClasspathAsset(AssetSource source,
                                             String path,
                                             Locale locale,
                                             Asset asset)

train_getCompleteId

protected final void train_getCompleteId(ComponentResourcesCommon resources,
                                         String completeId)

train_getComponent

protected final void train_getComponent(ComponentResources resources,
                                        Component component)

train_getComponentClassName

protected final void train_getComponentClassName(ComponentModel model,
                                                 String className)

train_getComponentResources

protected final void train_getComponentResources(Component component,
                                                 ComponentResources resources)

train_getConduit

protected final void train_getConduit(PropertyModel model,
                                      PropertyConduit conduit)

train_getConstraintType

protected <C,T> void train_getConstraintType(Validator<C,T> validator,
                                             Class<C> constraintType)

train_getContainer

protected final void train_getContainer(ComponentResources resources,
                                        Component container)

train_getContainerMessages

protected final void train_getContainerMessages(ComponentResources resources,
                                                Messages containerMessages)

train_getContainerResources

protected final void train_getContainerResources(ComponentResources resources,
                                                 ComponentResources containerResources)

train_getDateHeader

protected final void train_getDateHeader(Request request,
                                         String name,
                                         long value)

train_getFieldPersistenceStrategy

protected final void train_getFieldPersistenceStrategy(ComponentModel model,
                                                       String fieldName,
                                                       String fieldStrategy)

train_getId

protected final void train_getId(ComponentResources resources,
                                 String id)

train_getLabel

protected final void train_getLabel(Field field,
                                    String label)

train_getLocale

protected final void train_getLocale(ComponentResourcesCommon resources,
                                     Locale locale)

train_getLocale

protected final void train_getLocale(Request request,
                                     Locale locale)

train_getMessageKey

protected void train_getMessageKey(Validator validator,
                                   String messageKey)

train_getMessages

protected final void train_getMessages(ComponentResources resources,
                                       Messages messages)

train_getMeta

protected final void train_getMeta(ComponentModel model,
                                   String key,
                                   String value)

train_getOutputStream

protected final void train_getOutputStream(HttpServletResponse response,
                                           ServletOutputStream stream)

train_getPage

protected final void train_getPage(ComponentResources resources,
                                   Component page)

train_getParameterModel

protected final void train_getParameterModel(ComponentModel model,
                                             String parameterName,
                                             ParameterModel parameterModel)

train_getParameterNames

protected final void train_getParameterNames(ComponentModel model,
                                             String... names)

train_getParentModel

protected final void train_getParentModel(ComponentModel model,
                                          ComponentModel parentModel)

train_getPath

protected final void train_getPath(Request request,
                                   String path)

train_getPersistentFieldNames

protected final void train_getPersistentFieldNames(ComponentModel model,
                                                   String... names)

train_getRootResource

protected final void train_getRootResource(AssetFactory factory,
                                           Resource rootResource)

train_getSession

protected final void train_getSession(HttpServletRequest request,
                                      boolean create,
                                      HttpSession session)

train_getSession

protected void train_getSession(Request request,
                                boolean create,
                                Session session)

train_getSupportsInformalParameters

protected final void train_getSupportsInformalParameters(ComponentModel model,
                                                         boolean supports)

train_getValueType

protected final void train_getValueType(Validator validator,
                                        Class valueType)

train_handleResult

protected final void train_handleResult(ComponentEventCallback handler,
                                        Object result,
                                        boolean abort)

train_inError

protected final void train_inError(ValidationTracker tracker,
                                   Field field,
                                   boolean inError)

train_isRequired

protected final void train_isRequired(Validator validator,
                                      boolean isRequired)

train_isInvariant

protected final void train_isInvariant(Binding binding,
                                       boolean isInvariant)

train_isRequired

protected final void train_isRequired(ParameterModel model,
                                      boolean isRequired)

train_isRootClass

protected final void train_isRootClass(MutableComponentModel model,
                                       boolean isRootClass)

train_name

protected final void train_name(Parameter parameter,
                                String name)

train_newBinding

protected final void train_newBinding(BindingFactory factory,
                                      String description,
                                      ComponentResources container,
                                      ComponentResources component,
                                      String expression,
                                      Location l,
                                      Binding binding)

train_newBinding

protected void train_newBinding(BindingSource bindingSource,
                                String description,
                                ComponentResources componentResources,
                                String defaultBindingPrefix,
                                String expression,
                                Binding binding)

train_newMemberName

protected final void train_newMemberName(ClassTransformation transformation,
                                         String suggested,
                                         String name)

train_newMemberName

protected final void train_newMemberName(ClassTransformation transformation,
                                         String prefix,
                                         String baseName,
                                         String name)

train_peek

protected final <T> void train_peek(Environment env,
                                    Class<T> type,
                                    T value)

train_peekRequired

protected final <T> void train_peekRequired(Environment env,
                                            Class<T> type,
                                            T value)

train_provideInjection

protected final void train_provideInjection(InjectionProvider provider,
                                            String fieldName,
                                            Class fieldType,
                                            ObjectLocator locator,
                                            ClassTransformation transformation,
                                            MutableComponentModel model,
                                            boolean result)

train_renderInformalParameters

protected final void train_renderInformalParameters(ComponentResources resources,
                                                    MarkupWriter writer,
                                                    Object... informals)

train_requiresDigest

protected final void train_requiresDigest(ResourceDigestGenerator generator,
                                          String path,
                                          boolean requiresDigest)

train_service

protected final void train_service(RequestHandler handler,
                                   Request request,
                                   Response response,
                                   boolean result)
                            throws IOException
Throws:
IOException

train_setContentLength

protected final void train_setContentLength(HttpServletResponse response,
                                            int length)

train_setContentType

protected final void train_setContentType(HttpServletResponse response,
                                          String contentType)

train_setDateHeader

protected final void train_setDateHeader(HttpServletResponse response,
                                         String headerName,
                                         long date)

train_toClass

protected final void train_toClass(ClassTransformation transformation,
                                   String type,
                                   Class classForType)

train_toClientURL

protected final void train_toClientURL(Asset asset,
                                       String URL)

train_toClientURL

protected final void train_toClientURL(ClasspathAssetAliasManager manager,
                                       String resourcePath,
                                       String clientURL)

train_toRedirectURI

protected final void train_toRedirectURI(Link link,
                                         String URI)

train_value

protected final void train_value(Id annotation,
                                 String value)

train_value

protected final void train_value(Path annotation,
                                 String value)

train_getBoundType

protected final void train_getBoundType(ComponentResources resources,
                                        String parameterName,
                                        Class type)

mockBeanModel

protected final BeanModel mockBeanModel()

mockBeanModelSource

protected final BeanModelSource mockBeanModelSource()

train_getLocation

public final void train_getLocation(Locatable locatable,
                                    Location location)

train_getResource

public final void train_getResource(Location location,
                                    Resource resource)

train_getLine

public final void train_getLine(Location location,
                                int line)

train_getParameter

protected final void train_getParameter(Request request,
                                        String elementName,
                                        String value)

train_getPageName

protected final void train_getPageName(ComponentResourcesCommon resources,
                                       String pageName)

mockFormSupport

protected final FormSupport mockFormSupport()

messagesFor

protected final Messages messagesFor(Class componentClass)
                              throws IOException
Provides access to component messages, suitable for testing. Reads the associated .properties file for the class (NOT any localization of it). Only the messages directly in the .properties file is available.

Parameters:
componentClass - component class whose messages are needed *
Returns:
the Messages instance
Throws:
IOException

mockFieldValidationSupport

protected final FieldValidationSupport mockFieldValidationSupport()

train_getInheritInformalParameters

protected final void train_getInheritInformalParameters(EmbeddedComponentModel model,
                                                        boolean inherits)

mockApplicationStateManager

protected final ApplicationStateManager mockApplicationStateManager()

train_get

protected final <T> void train_get(ApplicationStateManager manager,
                                   Class<T> asoClass,
                                   T aso)

train_getInput

protected final void train_getInput(ValidationTracker tracker,
                                    Field field,
                                    String input)

train_isXHR

protected final void train_isXHR(Request request,
                                 boolean isXHR)

train_getPathInfo

protected void train_getPathInfo(HttpServletRequest request,
                                 String pathInfo)

train_service

protected final void train_service(HttpServletRequestHandler handler,
                                   HttpServletRequest request,
                                   HttpServletResponse response,
                                   boolean result)
                            throws IOException
Throws:
IOException

train_getServletPath

protected final void train_getServletPath(HttpServletRequest request,
                                          String path)

mockHttpServletRequestHandler

protected final HttpServletRequestHandler mockHttpServletRequestHandler()

mockNullFieldStrategy

protected final NullFieldStrategy mockNullFieldStrategy()

mockValueEncoderSource

protected final ValueEncoderSource mockValueEncoderSource()

mockValueEncoder

protected final ValueEncoder mockValueEncoder()

train_toClient

protected final void train_toClient(ValueEncoder valueEncoder,
                                    Object value,
                                    String encoded)

train_getValueEncoder

protected final void train_getValueEncoder(ValueEncoderSource source,
                                           Class type,
                                           ValueEncoder valueEncoder)

train_toValue

protected final void train_toValue(ValueEncoder valueEncoder,
                                   String clientValue,
                                   Object value)

train_findMeta

protected <T> void train_findMeta(MetaDataLocator locator,
                                  String key,
                                  ComponentResources resources,
                                  Class<T> expectedType,
                                  T value)

mockMetaDataLocator

protected MetaDataLocator mockMetaDataLocator()

train_isSecure

protected final void train_isSecure(Request request,
                                    boolean isSecure)

train_getBaseURL

protected final void train_getBaseURL(BaseURLSource baseURLSource,
                                      boolean secure,
                                      String baseURL)

mockBaseURLSource

protected final BaseURLSource mockBaseURLSource()

train_getAttribute

protected final void train_getAttribute(Request request,
                                        String attibuteName,
                                        Object value)

train_getBlockParameter

protected final void train_getBlockParameter(ComponentResources resources,
                                             String name,
                                             Block block)

mockPropertyOverrides

protected final PropertyOverrides mockPropertyOverrides()

train_getOverrideBlock

protected void train_getOverrideBlock(PropertyOverrides overrides,
                                      String name,
                                      Block block)

train_getOverrideMessages

protected final void train_getOverrideMessages(PropertyOverrides overrides,
                                               Messages messages)

train_isDisabled

protected final void train_isDisabled(Field field,
                                      boolean disabled)

mockValidationDecorator

protected final ValidationDecorator mockValidationDecorator()

train_isRequired

protected final void train_isRequired(Field field,
                                      boolean required)

train_getClientId

protected final void train_getClientId(ClientElement element,
                                       String clientId)

mockFieldTranslator

protected final FieldTranslator mockFieldTranslator()

mockTranslator

protected final Translator mockTranslator(String name,
                                          Class type)

train_getName

protected final void train_getName(Translator translator,
                                   String name)

train_getType

protected final void train_getType(Translator translator,
                                   Class type)

train_getType

protected final void train_getType(TransformField field,
                                   String type)

train_createDefaultTranslator

protected final void train_createDefaultTranslator(FieldTranslatorSource source,
                                                   ComponentResources resources,
                                                   String parameterName,
                                                   FieldTranslator translator)

mockTranslatorSource

protected final TranslatorSource mockTranslatorSource()

train_get

protected final void train_get(TranslatorSource translatorSource,
                               String name,
                               Translator translator)

train_getMessageKey

protected final void train_getMessageKey(Translator translator,
                                         String messageKey)

train_findByType

protected final void train_findByType(TranslatorSource ts,
                                      Class propertyType,
                                      Translator translator)

train_toURI

protected final void train_toURI(Link link,
                                 String URI)

train_createEditModel

protected final void train_createEditModel(BeanModelSource source,
                                           Class beanClass,
                                           Messages messages,
                                           BeanModel model)

mockComponentEventResultProcessor

protected final ComponentEventResultProcessor mockComponentEventResultProcessor()

train_getFormComponentId

protected final void train_getFormComponentId(FormSupport formSupport,
                                              String componentId)

train_getFormValidationId

protected final void train_getFormValidationId(FormSupport formSupport,
                                               String validationId)

train_isAllowNull

protected final void train_isAllowNull(ParameterModel model,
                                       boolean allowNull)

train_isInvalidated

protected final void train_isInvalidated(Session session,
                                         boolean invalidated)

mockComponentEventRequestHandler

protected final ComponentEventRequestHandler mockComponentEventRequestHandler()

mockComponentRequestHandler

protected final ComponentRequestHandler mockComponentRequestHandler()

mockAsset2

protected final Asset2 mockAsset2()

mockRequestGlobals

protected final RequestGlobals mockRequestGlobals()
Since:
5.2.0

mockPageRenderLinkSource

protected final PageRenderLinkSource mockPageRenderLinkSource()

mockJavaScriptSupport

protected final JavaScriptSupport mockJavaScriptSupport()

mockAsset

protected final Asset mockAsset(String assetURL)

mockLink

protected final Link mockLink(String absoluteURI)


Copyright © 2003-2012 The Apache Software Foundation.