Annotation Interface BctConfig
This annotation can be applied to test classes or test methods to automatically configure BCT settings before tests run and clear them after tests complete.
Example:
Method-level annotations override class-level annotations.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends BeanConverter>Custom bean converter class to use for BCT assertions.Enable sorting of collections in BCT assertions.Enable sorting of maps in BCT assertions.
-
Element Details
-
sortMaps
Enable sorting of maps in BCT assertions.- Returns:
TriState.TRUEto enable map sorting,TriState.FALSEto disable, orTriState.UNSETto inherit from class-level annotation.
- Default:
- UNSET
-
sortCollections
Enable sorting of collections in BCT assertions.- Returns:
TriState.TRUEto enable collection sorting,TriState.FALSEto disable, orTriState.UNSETto inherit from class-level annotation.
- Default:
- UNSET
-
beanConverter
Class<? extends BeanConverter> beanConverterCustom bean converter class to use for BCT assertions.If specified (not the default
BeanConverter), the class will be instantiated using its no-arg constructor and set as the converter for the current thread.Example:
@BctConfiguration (beanConverter=MyCustomConverter.class )class MyTest {@Test void testFoo() {// Uses MyCustomConverter for all assertions } }- Returns:
- The bean converter class to instantiate and use, or
BeanConverterto use the default.
- Default:
- org.apache.juneau.junit.bct.BeanConverter.class
-