Package de.cuioss.test.jsf.renderer
Class AbstractComponentRendererTest<R extends Renderer>
- java.lang.Object
-
- de.cuioss.test.jsf.junit5.JsfEnabledTestEnvironment
-
- de.cuioss.test.jsf.renderer.AbstractRendererTestBase<R>
-
- de.cuioss.test.jsf.renderer.AbstractComponentRendererTest<R>
-
- Type Parameters:
R- The renderer being tested
- All Implemented Interfaces:
JsfEnvironmentConsumer,de.cuioss.test.valueobjects.objects.ConfigurationCallBackHandler<R>
public abstract class AbstractComponentRendererTest<R extends Renderer> extends AbstractRendererTestBase<R>
WhileAbstractRendererTestBasefocuses on API-Contract utility methods, this class provides a number of implicit tests. Simplifying the testing of concrete renderer behavior.Configuration
You can configure this test by- Author:
- Oliver Wolff
-
-
Constructor Summary
Constructors Constructor Description AbstractComponentRendererTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<FacesEvent>extractEventsFromViewRoot()Helper method that extracts all queued events fromUIViewRoot.Set<RendererAttributeAssert>getActiveAsserts()protected UIComponentgetWrappedComponent()voidinitAbstractComponentRendererTest()Initializes the activeRendererAttributeAssertand checks for theVerifyComponentRendererConfigannotationbooleanisWrapComponentInForm()voidshouldHandleRendererAttributeAsserts()Iterates through all active RendererAttributeAssert and tests them accordingly-
Methods inherited from class de.cuioss.test.jsf.renderer.AbstractRendererTestBase
assertEmptyRenderResult, assertRenderResult, assertRenderResult, getComponent, getRenderer, renderToString
-
Methods inherited from class de.cuioss.test.jsf.junit5.JsfEnabledTestEnvironment
getEnvironmentHolder, setEnvironmentHolder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.cuioss.test.valueobjects.objects.ConfigurationCallBackHandler
configure
-
Methods inherited from interface de.cuioss.test.jsf.util.JsfEnvironmentConsumer
assertNavigatedWithOutcome, assertRedirect, getApplication, getApplicationConfigDecorator, getBeanConfigDecorator, getComponentConfigDecorator, getExternalContext, getFacesContext, getRequestConfigDecorator, getResponse
-
-
-
-
Constructor Detail
-
AbstractComponentRendererTest
public AbstractComponentRendererTest()
-
-
Method Detail
-
initAbstractComponentRendererTest
@BeforeEach public void initAbstractComponentRendererTest()
Initializes the activeRendererAttributeAssertand checks for theVerifyComponentRendererConfigannotation
-
shouldHandleRendererAttributeAsserts
@Test public void shouldHandleRendererAttributeAsserts()
Iterates through all active RendererAttributeAssert and tests them accordingly
-
getWrappedComponent
protected UIComponent getWrappedComponent()
- Returns:
- the
UIComponentderived byAbstractRendererTestBase.getComponent()or the same wrapped in anHtmlFormin caseisWrapComponentInForm()istrue
-
extractEventsFromViewRoot
public List<FacesEvent> extractEventsFromViewRoot()
Helper method that extracts all queued events fromUIViewRoot. In order to use this method the corresponding test must ensure, that the component under test is child ofUIViewRoot. Otherwise the events can not be extracted- Returns:
- the plain list of events available at
UIViewRootat this time.
-
getActiveAsserts
public Set<RendererAttributeAssert> getActiveAsserts()
-
isWrapComponentInForm
public boolean isWrapComponentInForm()
-
-