Package org.apache.tapestry5.test
Class TapestryTestCase
- java.lang.Object
-
- org.testng.Assert
-
- org.apache.tapestry5.test.ioc.TestUtils
-
- org.apache.tapestry5.test.ioc.TestBase
-
- org.apache.tapestry5.ioc.test.IOCTestCase
-
- 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
Constructors Constructor Description TapestryTestCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected MarkupWriter
createMarkupWriter()
Creates a new markup writer instance (not a markup writer mock).protected Messages
messagesFor(java.lang.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(java.lang.String assetURL)
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 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(java.lang.String label)
protected FormSupport
mockFormSupport()
protected Heartbeat
mockHeartbeat()
protected Html5Support
mockHtml5Support()
protected HttpServletRequest
mockHttpServletRequest()
protected HttpServletRequestHandler
mockHttpServletRequestHandler()
protected HttpServletResponse
mockHttpServletResponse()
protected HttpSession
mockHttpSession()
protected Inject
mockInject()
protected JavaScriptSupport
mockJavaScriptSupport()
protected Link
mockLink()
protected Link
mockLink(java.lang.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 Response
mockResponse()
protected Session
mockSession()
protected Translator
mockTranslator()
protected Translator
mockTranslator(java.lang.String name, java.lang.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, java.lang.Class propertyType, AnnotationProvider provider, java.lang.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, java.lang.String parameterName, FieldTranslator translator)
protected void
train_createEditModel(BeanModelSource source, java.lang.Class beanClass, Messages messages, BeanModel model)
protected void
train_createValidator(FieldValidatorSource source, Field field, java.lang.String validatorType, java.lang.String constraintValue, java.lang.String overrideId, Messages overrideMessages, java.util.Locale locale, FieldValidator result)
protected void
train_encodeRedirectURL(Response response, java.lang.String URI, java.lang.String encoded)
protected void
train_encodeURL(Response response, java.lang.String inputURL, java.lang.String outputURL)
protected <T> void
train_exists(ApplicationStatePersistenceStrategy strategy, java.lang.Class<T> asoClass, boolean exists)
protected void
train_findByType(TranslatorSource ts, java.lang.Class propertyType, Translator translator)
protected <T> void
train_findMeta(MetaDataLocator locator, java.lang.String key, ComponentResources resources, java.lang.Class<T> expectedType, T value)
protected void
train_generateChecksum(ResourceDigestGenerator generator, java.net.URL url, java.lang.String digest)
protected void
train_get(Binding binding, java.lang.Object value)
protected <T> void
train_get(ApplicationStateManager manager, java.lang.Class<T> asoClass, T aso)
protected <T> void
train_get(ApplicationStatePersistenceStrategy strategy, java.lang.Class<T> asoClass, ApplicationStateCreator<T> creator, T aso)
protected void
train_get(ApplicationStatePersistenceStrategySource source, java.lang.String strategyName, ApplicationStatePersistenceStrategy strategy)
protected void
train_get(TranslatorSource translatorSource, java.lang.String name, Translator translator)
protected void
train_getAsset(AssetSource source, Resource root, java.lang.String path, java.util.Locale locale, Asset asset)
protected void
train_getAttribute(HttpSession session, java.lang.String attributeName, java.lang.Object value)
protected void
train_getAttribute(Request request, java.lang.String attibuteName, java.lang.Object value)
protected void
train_getAttribute(Session session, java.lang.String name, java.lang.Object attribute)
protected void
train_getAttributeNames(Session session, java.lang.String prefix, java.lang.String... names)
protected void
train_getBaseResource(ComponentModel model, Resource resource)
protected void
train_getBaseURL(BaseURLSource baseURLSource, boolean secure, java.lang.String baseURL)
protected void
train_getBlockParameter(ComponentResources resources, java.lang.String name, Block block)
protected void
train_getBoundType(ComponentResources resources, java.lang.String parameterName, java.lang.Class type)
protected void
train_getClasspathAsset(AssetSource source, java.lang.String path, java.util.Locale locale, Asset asset)
protected void
train_getClasspathAsset(AssetSource source, java.lang.String path, Asset asset)
protected void
train_getClientId(ClientElement element, java.lang.String clientId)
protected void
train_getCompleteId(ComponentResourcesCommon resources, java.lang.String completeId)
protected void
train_getComponent(ComponentResources resources, Component component)
protected void
train_getComponentClassName(ComponentModel model, java.lang.String className)
protected void
train_getComponentResources(Component component, ComponentResources resources)
protected void
train_getConduit(PropertyModel model, PropertyConduit conduit)
protected <C,T>
voidtrain_getConstraintType(Validator<C,T> validator, java.lang.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, java.lang.String name, long value)
protected void
train_getFieldPersistenceStrategy(ComponentModel model, java.lang.String fieldName, java.lang.String fieldStrategy)
protected void
train_getFormComponentId(FormSupport formSupport, java.lang.String componentId)
protected void
train_getFormValidationId(FormSupport formSupport, java.lang.String validationId)
protected void
train_getId(ComponentResources resources, java.lang.String id)
protected <T> void
train_getIfExists(ApplicationStatePersistenceStrategy strategy, java.lang.Class<T> asoClass, T aso)
protected void
train_getInheritInformalParameters(EmbeddedComponentModel model, boolean inherits)
protected void
train_getInput(ValidationTracker tracker, Field field, java.lang.String input)
protected void
train_getLabel(Field field, java.lang.String label)
void
train_getLine(Location location, int line)
protected void
train_getLocale(ComponentResourcesCommon resources, java.util.Locale locale)
protected void
train_getLocale(Request request, java.util.Locale locale)
void
train_getLocation(Locatable locatable, Location location)
protected void
train_getMessageKey(Translator translator, java.lang.String messageKey)
protected void
train_getMessageKey(Validator validator, java.lang.String messageKey)
protected void
train_getMessages(ComponentResources resources, Messages messages)
protected void
train_getMeta(ComponentModel model, java.lang.String key, java.lang.String value)
protected void
train_getName(Translator translator, java.lang.String name)
protected void
train_getOutputStream(HttpServletResponse response, ServletOutputStream stream)
protected void
train_getOverrideBlock(PropertyOverrides overrides, java.lang.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, java.lang.String pageName)
protected void
train_getParameter(Request request, java.lang.String elementName, java.lang.String value)
protected void
train_getParameterModel(ComponentModel model, java.lang.String parameterName, ParameterModel parameterModel)
protected void
train_getParameterNames(ComponentModel model, java.lang.String... names)
protected void
train_getParentModel(ComponentModel model, ComponentModel parentModel)
protected void
train_getPath(Request request, java.lang.String path)
protected void
train_getPathInfo(HttpServletRequest request, java.lang.String pathInfo)
protected void
train_getPersistentFieldNames(ComponentModel model, java.lang.String... names)
void
train_getResource(Location location, Resource resource)
protected void
train_getRootResource(AssetFactory factory, Resource rootResource)
protected void
train_getServletPath(HttpServletRequest request, java.lang.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(Translator translator, java.lang.Class type)
protected void
train_getValueEncoder(ValueEncoderSource source, java.lang.Class type, ValueEncoder valueEncoder)
protected void
train_getValueType(Validator validator, java.lang.Class valueType)
protected void
train_handleResult(ComponentEventCallback handler, java.lang.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_name(Parameter parameter, java.lang.String name)
protected void
train_newBinding(BindingFactory factory, java.lang.String description, ComponentResources container, ComponentResources component, java.lang.String expression, Location l, Binding binding)
protected void
train_newBinding(BindingSource bindingSource, java.lang.String description, ComponentResources componentResources, java.lang.String defaultBindingPrefix, java.lang.String expression, Binding binding)
protected <T> void
train_peek(Environment env, java.lang.Class<T> type, T value)
protected <T> void
train_peekRequired(Environment env, java.lang.Class<T> type, T value)
protected void
train_renderInformalParameters(ComponentResources resources, MarkupWriter writer, java.lang.Object... informals)
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, java.lang.String contentType)
protected void
train_setDateHeader(HttpServletResponse response, java.lang.String headerName, long date)
protected void
train_toClient(ValueEncoder valueEncoder, java.lang.Object value, java.lang.String encoded)
protected void
train_toClientURL(Asset asset, java.lang.String URL)
Deprecated.Deprecated in 5.4 with no replacement.protected void
train_toRedirectURI(Link link, java.lang.String URI)
protected void
train_toURI(Link link, java.lang.String URI)
protected void
train_toValue(ValueEncoder valueEncoder, java.lang.String clientValue, java.lang.Object value)
protected void
train_value(Id annotation, java.lang.String value)
protected void
train_value(Path annotation, java.lang.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.test.ioc.TestBase
discardMockControl, expect, getMocksControl, newCapture, newMock, replay, setAnswer, setThrowable, verify
-
Methods inherited from class org.apache.tapestry5.test.ioc.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, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsDeep, assertEqualsDeep, assertEqualsDeep, assertEqualsNoOrder, assertEqualsNoOrder, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEqualsDeep, assertNotEqualsDeep, assertNotEqualsDeep, assertNotEqualsDeep, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThrows, assertThrows, assertTrue, assertTrue, expectThrows, fail, fail, fail
-
-
-
-
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()
-
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()
-
mockClasspathAssetAliasManager
protected final ClasspathAssetAliasManager mockClasspathAssetAliasManager()
-
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()
-
mockHtml5Support
protected final Html5Support mockHtml5Support()
-
mockFieldValidator
protected final FieldValidator mockFieldValidator()
-
mockFieldValidatorSource
protected FieldValidatorSource mockFieldValidatorSource()
-
mockFieldWithLabel
protected final Field mockFieldWithLabel(java.lang.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()
-
mockMarkupWriter
protected final MarkupWriter mockMarkupWriter()
-
mockMutableComponentModel
protected final MutableComponentModel mockMutableComponentModel()
-
mockParameterModel
protected final ParameterModel mockParameterModel()
-
mockPropertyConduit
protected final PropertyConduit mockPropertyConduit()
-
mockPropertyModel
protected final PropertyModel mockPropertyModel()
-
mockRequest
protected final Request mockRequest()
-
mockRequestHandler
protected final RequestHandler mockRequestHandler()
-
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, java.lang.Class propertyType, AnnotationProvider provider, java.lang.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, java.lang.String validatorType, java.lang.String constraintValue, java.lang.String overrideId, Messages overrideMessages, java.util.Locale locale, FieldValidator result)
-
train_encodeRedirectURL
protected final void train_encodeRedirectURL(Response response, java.lang.String URI, java.lang.String encoded)
-
train_encodeURL
protected final void train_encodeURL(Response response, java.lang.String inputURL, java.lang.String outputURL)
-
train_exists
protected final <T> void train_exists(ApplicationStatePersistenceStrategy strategy, java.lang.Class<T> asoClass, boolean exists)
-
train_getAsset
protected final void train_getAsset(AssetSource source, Resource root, java.lang.String path, java.util.Locale locale, Asset asset)
-
train_generateChecksum
protected final void train_generateChecksum(ResourceDigestGenerator generator, java.net.URL url, java.lang.String digest)
-
train_get
protected final <T> void train_get(ApplicationStatePersistenceStrategy strategy, java.lang.Class<T> asoClass, ApplicationStateCreator<T> creator, T aso)
-
train_get
protected final void train_get(ApplicationStatePersistenceStrategySource source, java.lang.String strategyName, ApplicationStatePersistenceStrategy strategy)
-
train_getIfExists
protected final <T> void train_getIfExists(ApplicationStatePersistenceStrategy strategy, java.lang.Class<T> asoClass, T aso)
-
train_getAttribute
protected void train_getAttribute(HttpSession session, java.lang.String attributeName, java.lang.Object value)
-
train_getAttribute
protected final void train_getAttribute(Session session, java.lang.String name, java.lang.Object attribute)
-
train_getAttributeNames
protected final void train_getAttributeNames(Session session, java.lang.String prefix, java.lang.String... names)
-
train_getBaseResource
protected final void train_getBaseResource(ComponentModel model, Resource resource)
-
train_getClasspathAsset
protected final void train_getClasspathAsset(AssetSource source, java.lang.String path, Asset asset)
-
train_getClasspathAsset
protected final void train_getClasspathAsset(AssetSource source, java.lang.String path, java.util.Locale locale, Asset asset)
-
train_getCompleteId
protected final void train_getCompleteId(ComponentResourcesCommon resources, java.lang.String completeId)
-
train_getComponent
protected final void train_getComponent(ComponentResources resources, Component component)
-
train_getComponentClassName
protected final void train_getComponentClassName(ComponentModel model, java.lang.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, java.lang.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, java.lang.String name, long value)
-
train_getFieldPersistenceStrategy
protected final void train_getFieldPersistenceStrategy(ComponentModel model, java.lang.String fieldName, java.lang.String fieldStrategy)
-
train_getId
protected final void train_getId(ComponentResources resources, java.lang.String id)
-
train_getLabel
protected final void train_getLabel(Field field, java.lang.String label)
-
train_getLocale
protected final void train_getLocale(ComponentResourcesCommon resources, java.util.Locale locale)
-
train_getLocale
protected final void train_getLocale(Request request, java.util.Locale locale)
-
train_getMessageKey
protected void train_getMessageKey(Validator validator, java.lang.String messageKey)
-
train_getMessages
protected final void train_getMessages(ComponentResources resources, Messages messages)
-
train_getMeta
protected final void train_getMeta(ComponentModel model, java.lang.String key, java.lang.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, java.lang.String parameterName, ParameterModel parameterModel)
-
train_getParameterNames
protected final void train_getParameterNames(ComponentModel model, java.lang.String... names)
-
train_getParentModel
protected final void train_getParentModel(ComponentModel model, ComponentModel parentModel)
-
train_getPath
protected final void train_getPath(Request request, java.lang.String path)
-
train_getPersistentFieldNames
protected final void train_getPersistentFieldNames(ComponentModel model, java.lang.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, java.lang.Class valueType)
-
train_handleResult
protected final void train_handleResult(ComponentEventCallback handler, java.lang.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, java.lang.String name)
-
train_newBinding
protected final void train_newBinding(BindingFactory factory, java.lang.String description, ComponentResources container, ComponentResources component, java.lang.String expression, Location l, Binding binding)
-
train_newBinding
protected void train_newBinding(BindingSource bindingSource, java.lang.String description, ComponentResources componentResources, java.lang.String defaultBindingPrefix, java.lang.String expression, Binding binding)
-
train_peek
protected final <T> void train_peek(Environment env, java.lang.Class<T> type, T value)
-
train_peekRequired
protected final <T> void train_peekRequired(Environment env, java.lang.Class<T> type, T value)
-
train_renderInformalParameters
protected final void train_renderInformalParameters(ComponentResources resources, MarkupWriter writer, java.lang.Object... informals)
-
train_service
protected final void train_service(RequestHandler handler, Request request, Response response, boolean result) throws java.io.IOException
- Throws:
java.io.IOException
-
train_setContentLength
protected final void train_setContentLength(HttpServletResponse response, int length)
-
train_setContentType
protected final void train_setContentType(HttpServletResponse response, java.lang.String contentType)
-
train_setDateHeader
protected final void train_setDateHeader(HttpServletResponse response, java.lang.String headerName, long date)
-
train_toClientURL
protected final void train_toClientURL(Asset asset, java.lang.String URL)
Deprecated.Deprecated in 5.4 with no replacement.
-
train_toRedirectURI
protected final void train_toRedirectURI(Link link, java.lang.String URI)
-
train_value
protected final void train_value(Id annotation, java.lang.String value)
-
train_value
protected final void train_value(Path annotation, java.lang.String value)
-
train_getBoundType
protected final void train_getBoundType(ComponentResources resources, java.lang.String parameterName, java.lang.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, java.lang.String elementName, java.lang.String value)
-
train_getPageName
protected final void train_getPageName(ComponentResourcesCommon resources, java.lang.String pageName)
-
mockFormSupport
protected final FormSupport mockFormSupport()
-
messagesFor
protected final Messages messagesFor(java.lang.Class componentClass) throws java.io.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:
java.io.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, java.lang.Class<T> asoClass, T aso)
-
train_getInput
protected final void train_getInput(ValidationTracker tracker, Field field, java.lang.String input)
-
train_isXHR
protected final void train_isXHR(Request request, boolean isXHR)
-
train_getPathInfo
protected void train_getPathInfo(HttpServletRequest request, java.lang.String pathInfo)
-
train_service
protected final void train_service(HttpServletRequestHandler handler, HttpServletRequest request, HttpServletResponse response, boolean result) throws java.io.IOException
- Throws:
java.io.IOException
-
train_getServletPath
protected final void train_getServletPath(HttpServletRequest request, java.lang.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, java.lang.Object value, java.lang.String encoded)
-
train_getValueEncoder
protected final void train_getValueEncoder(ValueEncoderSource source, java.lang.Class type, ValueEncoder valueEncoder)
-
train_toValue
protected final void train_toValue(ValueEncoder valueEncoder, java.lang.String clientValue, java.lang.Object value)
-
train_findMeta
protected <T> void train_findMeta(MetaDataLocator locator, java.lang.String key, ComponentResources resources, java.lang.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, java.lang.String baseURL)
-
mockBaseURLSource
protected final BaseURLSource mockBaseURLSource()
-
train_getAttribute
protected final void train_getAttribute(Request request, java.lang.String attibuteName, java.lang.Object value)
-
train_getBlockParameter
protected final void train_getBlockParameter(ComponentResources resources, java.lang.String name, Block block)
-
mockPropertyOverrides
protected final PropertyOverrides mockPropertyOverrides()
-
train_getOverrideBlock
protected void train_getOverrideBlock(PropertyOverrides overrides, java.lang.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, java.lang.String clientId)
-
mockFieldTranslator
protected final FieldTranslator mockFieldTranslator()
-
mockTranslator
protected final Translator mockTranslator(java.lang.String name, java.lang.Class type)
-
train_getName
protected final void train_getName(Translator translator, java.lang.String name)
-
train_getType
protected final void train_getType(Translator translator, java.lang.Class type)
-
train_createDefaultTranslator
protected final void train_createDefaultTranslator(FieldTranslatorSource source, ComponentResources resources, java.lang.String parameterName, FieldTranslator translator)
-
mockTranslatorSource
protected final TranslatorSource mockTranslatorSource()
-
train_get
protected final void train_get(TranslatorSource translatorSource, java.lang.String name, Translator translator)
-
train_getMessageKey
protected final void train_getMessageKey(Translator translator, java.lang.String messageKey)
-
train_findByType
protected final void train_findByType(TranslatorSource ts, java.lang.Class propertyType, Translator translator)
-
train_toURI
protected final void train_toURI(Link link, java.lang.String URI)
-
train_createEditModel
protected final void train_createEditModel(BeanModelSource source, java.lang.Class beanClass, Messages messages, BeanModel model)
-
mockComponentEventResultProcessor
protected final ComponentEventResultProcessor mockComponentEventResultProcessor()
-
train_getFormComponentId
protected final void train_getFormComponentId(FormSupport formSupport, java.lang.String componentId)
-
train_getFormValidationId
protected final void train_getFormValidationId(FormSupport formSupport, java.lang.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()
-
mockRequestGlobals
protected final RequestGlobals mockRequestGlobals()
- Since:
- 5.2.0
-
mockPageRenderLinkSource
protected final PageRenderLinkSource mockPageRenderLinkSource()
-
mockJavaScriptSupport
protected final JavaScriptSupport mockJavaScriptSupport()
-
-