Package com.vladsch.flexmark.test.util
Class ComboSpecTestCase
- java.lang.Object
-
- com.vladsch.flexmark.test.util.RenderingTestCase
-
- com.vladsch.flexmark.test.util.FullSpecTestCase
-
- com.vladsch.flexmark.test.util.ComboSpecTestCase
-
- All Implemented Interfaces:
SpecExampleProcessor
- Direct Known Subclasses:
FormatterTranslationSpecTestBase
,RendererSpecTest
public abstract class ComboSpecTestCase extends FullSpecTestCase
-
-
Field Summary
Fields Modifier and Type Field Description static DataKey<java.util.function.BiFunction<java.lang.String,java.lang.String,DataHolder>>
CUSTOM_OPTION
protected @NotNull SpecExample
example
protected @Nullable DataHolder
myDefaultOptions
protected @NotNull java.util.Map<java.lang.String,DataHolder>
optionsMap
-
Fields inherited from class com.vladsch.flexmark.test.util.RenderingTestCase
EMBED_TIMED, EXTENSIONS, FAIL, IGNORE, INCLUDED_DOCUMENT, LOAD_EXTENSIONS, NO_FILE_EOL, NO_FILE_EOL_FALSE, SOURCE_INDENT, SOURCE_PREFIX, SOURCE_SUFFIX, thrown, TIMED, TIMED_ITERATIONS, UNLOAD_EXTENSIONS
-
-
Constructor Summary
Constructors Constructor Description ComboSpecTestCase(@NotNull SpecExample example, @Nullable java.util.Map<java.lang.String,? extends DataHolder> optionMap, @Nullable DataHolder... defaultOptions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull DataHolder
aggregate(@Nullable DataHolder other, @Nullable DataHolder overrides)
protected boolean
compoundSections()
static @Nullable DataHolder[]
dataHolders(@Nullable DataHolder other, @Nullable DataHolder[] overrides)
protected @NotNull ResourceLocation
getSpecResourceLocation()
protected static @NotNull java.util.List<java.lang.Object[]>
getTestData(@NotNull ResourceLocation location)
@Nullable DataHolder
options(@NotNull java.lang.String option)
Customize options for an examplestatic @Nullable java.util.Map<java.lang.String,? extends DataHolder>
optionsMaps(@Nullable java.util.Map<java.lang.String,? extends DataHolder> other, @Nullable java.util.Map<java.lang.String,? extends DataHolder> overrides)
static @NotNull java.util.Map<java.lang.String,DataHolder>
placementAndSortOptions(@Nullable DataKey<KeepType> keepTypeDataKey, @Nullable DataKey<ElementPlacement> placementDataKey, @Nullable DataKey<ElementPlacementSort> sortDataKey)
static @NotNull java.util.Map<java.lang.String,DataHolder>
placementAndSortOptions(DataKey<ElementPlacement> placementDataKey, DataKey<ElementPlacementSort> sortDataKey)
void
testSpecExample()
-
Methods inherited from class com.vladsch.flexmark.test.util.FullSpecTestCase
create, fullTestSpecComplete, fullTestSpecStarting
-
Methods inherited from class com.vladsch.flexmark.test.util.RenderingTestCase
addFullSpecExample, addSpecExample, assertRendering, assertRendering, assertRendering
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vladsch.flexmark.test.util.SpecExampleProcessor
addFullSpecExample, checkExample, getSpecExampleRenderer
-
-
-
-
Field Detail
-
CUSTOM_OPTION
public static final DataKey<java.util.function.BiFunction<java.lang.String,java.lang.String,DataHolder>> CUSTOM_OPTION
-
example
@NotNull protected final @NotNull SpecExample example
-
optionsMap
@NotNull protected final @NotNull java.util.Map<java.lang.String,DataHolder> optionsMap
-
myDefaultOptions
@Nullable protected final @Nullable DataHolder myDefaultOptions
-
-
Constructor Detail
-
ComboSpecTestCase
public ComboSpecTestCase(@NotNull @NotNull SpecExample example, @Nullable @Nullable java.util.Map<java.lang.String,? extends DataHolder> optionMap, @Nullable @Nullable DataHolder... defaultOptions)
-
-
Method Detail
-
placementAndSortOptions
@NotNull public static @NotNull java.util.Map<java.lang.String,DataHolder> placementAndSortOptions(DataKey<ElementPlacement> placementDataKey, DataKey<ElementPlacementSort> sortDataKey)
-
placementAndSortOptions
@NotNull public static @NotNull java.util.Map<java.lang.String,DataHolder> placementAndSortOptions(@Nullable @Nullable DataKey<KeepType> keepTypeDataKey, @Nullable @Nullable DataKey<ElementPlacement> placementDataKey, @Nullable @Nullable DataKey<ElementPlacementSort> sortDataKey)
-
compoundSections
protected boolean compoundSections()
- Overrides:
compoundSections
in classFullSpecTestCase
-
optionsMaps
@Nullable public static @Nullable java.util.Map<java.lang.String,? extends DataHolder> optionsMaps(@Nullable @Nullable java.util.Map<java.lang.String,? extends DataHolder> other, @Nullable @Nullable java.util.Map<java.lang.String,? extends DataHolder> overrides)
-
dataHolders
@Nullable public static @Nullable DataHolder[] dataHolders(@Nullable @Nullable DataHolder other, @Nullable @Nullable DataHolder[] overrides)
-
aggregate
@NotNull public static @NotNull DataHolder aggregate(@Nullable @Nullable DataHolder other, @Nullable @Nullable DataHolder overrides)
-
options
@Nullable public @Nullable DataHolder options(@NotNull @NotNull java.lang.String option)
Description copied from interface:SpecExampleProcessor
Customize options for an example- Parameters:
option
- name of the options set to use- Returns:
- options or null to use default
-
getSpecResourceLocation
@NotNull protected final @NotNull ResourceLocation getSpecResourceLocation()
- Specified by:
getSpecResourceLocation
in classFullSpecTestCase
-
testSpecExample
public void testSpecExample()
- Overrides:
testSpecExample
in classFullSpecTestCase
-
getTestData
@NotNull protected static @NotNull java.util.List<java.lang.Object[]> getTestData(@NotNull @NotNull ResourceLocation location)
-
-