abstract class NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<in T : AssertionGroupType> : SingleAssertionGroupTypeFormatter<T>
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: Class<T>, assertionFormatterController: AssertionFormatterController)
A base type for AssertionFormatter which canFormat only AssertionGroups of one specific AssertionGroupType. |
open fun formatGroupAssertions(formatAssertions: (AssertionFormatterMethodObject, (Assertion) -> Unit) -> Unit, childMethodObject: AssertionFormatterMethodObject): 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, methodObject: AssertionFormatterMethodObject, formatAssertions: (AssertionFormatterMethodObject, (Assertion) -> Unit) -> Unit): Unit
Checks whether assertionGroup is T or a sub type and if so, calls formatGroupHeaderAndGetChildMethodObject and uses the resulting child-AssertionFormatterMethodObject to format AssertionGroup.assertions. |
|
abstract fun formatGroupHeaderAndGetChildMethodObject(assertionGroup: AssertionGroup, methodObject: AssertionFormatterMethodObject): AssertionFormatterMethodObject
Formats the group header of the given assertionGroup (with type T) -- appends the result to the sb of the given methodObject -- and returns the AssertionFormatterMethodObject which shall be used for the AssertionGroup.assertions. |
|
fun formatNonGroup(assertion: Assertion, methodObject: AssertionFormatterMethodObject): Nothing
Always throws an UnsupportedOperationException, because this AssertionFormatter can only format AssertionGroups. |
class InvisibleAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<InvisibleAssertionGroupType>
Represents an AssertionFormatter which formats AssertionGroups with an InvisibleAssertionGroupType or rather does not format them but only passes on the given AssertionFormatterMethodObject as child-AssertionFormatterMethodObject for the formatting of the AssertionGroup.assertions. |
|
class TextExplanatoryAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<ExplanatoryAssertionGroupType>
Represents an AssertionFormatter which formats AssertionGroups with an ExplanatoryAssertionGroupType by neglecting the group header and defining an child-AssertionFormatterMethodObject which indicates that we are in an explanatory assertion. |
|
class TextFeatureAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<FeatureAssertionGroupType>
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. |
|
class TextIndentAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<IndentAssertionGroupType>
Represents an AssertionFormatter which formats AssertionGroups with an IndentAssertionGroupType or rather creates a child-AssertionFormatterMethodObject which proposes to use the bullet point defined for IndentAssertionGroupType for the AssertionGroup.assertions. |
|
abstract class TextListBasedAssertionGroupFormatter<in T : AssertionGroupType> : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<T>
Represents an AssertionFormatter which formats AssertionGroups with type T by using the given
assertionPairFormatter to format the group header and using the given |