Package de.cuioss.test.jsf.converter
Class AbstractSanitizingConverterTest<C extends Converter<T>,T>
- java.lang.Object
-
- de.cuioss.test.jsf.junit5.JsfEnabledTestEnvironment
-
- de.cuioss.test.jsf.converter.AbstractConverterTest<C,T>
-
- de.cuioss.test.jsf.converter.AbstractSanitizingConverterTest<C,T>
-
- Type Parameters:
C- identifying the concreteConverterto be tested.T- identifying the type of elements to be used for values to be given to theConverter
- All Implemented Interfaces:
ComponentConfigurator,JsfTestContextConfigurator,JsfEnvironmentConsumer,de.cuioss.test.valueobjects.objects.ConfigurationCallBackHandler<C>
public abstract class AbstractSanitizingConverterTest<C extends Converter<T>,T> extends AbstractConverterTest<C,T>
Extension of AbstractConverterTest to also test the sanitizing inside the getAsString function.
-
-
Constructor Summary
Constructors Constructor Description AbstractSanitizingConverterTest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TcreateTestObjectWithMaliciousContent(String content)Create an instance of the object containing a given malicious content that is to be converted into a string by this converter.protected voidshouldSanitizeJavaScript()-
Methods inherited from class de.cuioss.test.jsf.converter.AbstractConverterTest
configureComponents, getComponent, getConverter, getTestItems, initConverter, populate, setComponent
-
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
-
AbstractSanitizingConverterTest
public AbstractSanitizingConverterTest()
-
-
Method Detail
-
createTestObjectWithMaliciousContent
protected abstract T createTestObjectWithMaliciousContent(String content)
Create an instance of the object containing a given malicious content that is to be converted into a string by this converter.- Parameters:
content-- Returns:
-
shouldSanitizeJavaScript
@Test protected void shouldSanitizeJavaScript()
-
-