abstract class NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<in T : AssertionGroupType> : SingleAssertionGroupTypeFormatter<T>
(source)
A base type for AssertionFormatter which canFormat only AssertionGroups of one specific AssertionGroupType and does nothing special when it comes to formatting AssertionGroup.assertions (merely delegates to assertionFormatterController).
T
- The AssertionGroupType which the concrete sub class canFormat.
NoSpecialChildFormattingSingleAssertionGroupTypeFormatter(clazz: KClass<T>, assertionFormatterController: AssertionFormatterController)
A base type for AssertionFormatter which canFormat only AssertionGroups of one specific AssertionGroupType. |
open fun formatGroupAssertions(formatAssertions: (AssertionFormatterParameterObject, (Assertion) -> Unit) -> Unit, childParameterObject: AssertionFormatterParameterObject): Unit
Formats the AssertionGroup.assertions -- has to call the given formatAssertions function in order that the AssertionFormatterController can steer the process. |
fun canFormat(assertion: Assertion): Boolean
Returns true if the given assertion is an AssertionGroup and its type is T or a sub type. |
|
fun formatGroup(assertionGroup: AssertionGroup, parameterObject: AssertionFormatterParameterObject, formatAssertions: (AssertionFormatterParameterObject, (Assertion) -> Unit) -> Unit): Unit
Checks whether assertionGroup is T or a sub type and if so, calls formatGroupHeaderAndGetChildParameterObject and uses the resulting child-AssertionFormatterParameterObject to format AssertionGroup.assertions. |
|
abstract fun formatGroupHeaderAndGetChildParameterObject(assertionGroup: AssertionGroup, parameterObject: AssertionFormatterParameterObject): AssertionFormatterParameterObject
Formats the group header of the given assertionGroup (with type T) -- appends the result to the sb of the given parameterObject -- and returns the AssertionFormatterParameterObject which shall be used for the AssertionGroup.assertions. |
|
fun formatNonGroup(assertion: Assertion, parameterObject: AssertionFormatterParameterObject): Nothing
Always throws an UnsupportedOperationException, because this AssertionFormatter can only format AssertionGroups. |
class TextExplanatoryAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<ExplanatoryAssertionGroupType>, TextAssertionFormatter
Represents an AssertionFormatter which formats AssertionGroups with an ExplanatoryAssertionGroupType by neglecting the group header and defining an child-AssertionFormatterParameterObject which indicates that we are in an explanatory assertion. |
|
class TextFeatureAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<FeatureAssertionGroupType>, TextAssertionFormatter
Represents an AssertionFormatter which formats AssertionGroups with a FeatureAssertionGroupType by using the given assertionPairFormatter to format the group header, additionally prefixing it with the "bullet point" (typically an arrow) defined for PrefixFeatureAssertionGroupHeader and uses the bullet point defined for FeatureAssertionGroupType as prefix for the AssertionGroup.assertions. |
|
abstract class TextListBasedAssertionGroupFormatter<in T : AssertionGroupType> : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<T>, TextAssertionFormatter
Represents an AssertionFormatter which formats AssertionGroups with type T by using the given
assertionPairFormatter to format the group header and using the given |