The AssertionBuilder and other builders to ease the creation of Assertions.
interface AssertionBuilder
Represents a builder which creates Assertions and AssertionGroups. |
|
interface AssertionBuilderFinalStep<T : Assertion>
Final step in the AssertionBuilder process, creates the desired Assertion of type T. |
|
interface AssertionGroupDescriptionAndEmptyRepresentationOption<out T : AssertionGroupType, R>
Option step which allows to specify the AssertionGroup.description -- RawString.EMPTY is used as AssertionGroup.representation. |
|
interface AssertionGroupDescriptionAndRepresentationOption<out T : AssertionGroupType, R>
Option step which allows to specify AssertionGroup.description and AssertionGroup.representation. |
|
interface AssertionsOption<out T : AssertionGroupType, out R>
Option step which allows to specify AssertionGroup.assertions. |
|
interface BasicAssertionGroupFinalStep : AssertionBuilderFinalStep<AssertionGroup>
Final step which creates an AssertionGroup with the previously defined groupType, description, representation and assertions. |
|
interface Descriptive
Defines the contract to build a DescriptiveAssertion. |
|
interface Explanatory
Defines the contract to build an ExplanatoryAssertion. |
|
interface
Final step which creates an AssertionGroup with an ExplanatoryAssertionGroupType based on the previously defined groupType and the explanatoryAssertions. |
|
interface
Option step which allows to specify what ExplanatoryAssertionGroupType is used as AssertionGroup.type. |
|
interface ExplanatoryGroup
Defines the contract to build an AssertionGroup with an ExplanatoryAssertionGroupType. |
typealias DefaultAssertionGroupBuilderOptions<T> = AssertionGroupDescriptionAndRepresentationOption<T, AssertionsOption<T, BasicAssertionGroupFinalStep>>
Type alias which can be used if only the AssertionGroupType is parameterised and the next step is an AssertionsOption which in turn has the BasicAssertionGroupFinalStep as final step. |
val assertionBuilder: AssertionBuilder
Returns the AssertionBuilder. |
|
val AssertionBuilder.invisibleGroup: AssertionsOption<InvisibleAssertionGroupType, BasicAssertionGroupFinalStep>
Builder to create an AssertionGroup with an InvisibleAssertionGroupType -- use it only if you have several independent Assertions which should be evaluated together. |
|
val AssertionBuilder.root: DefaultAssertionGroupBuilderOptions<RootAssertionGroupType>
Builder to create the root AssertionGroup -- do not use it in assertion functions; this group should only be created by AssertionCheckers. |
fun <T : ExplanatoryAssertionGroupType> AssertionsOption<T, ExplanatoryAssertionGroupFinalStep>.withExplanatoryAssertion(translatable: Translatable): ExplanatoryAssertionGroupFinalStep
Creates the AssertionGroup with the previously specified AssertionsOption.groupType using the given translatable to create an ExplanatoryAssertion which is used as single Assertion in AssertionGroup.assertions. |
|
fun <T : ExplanatoryAssertionGroupType> AssertionsOption<T, ExplanatoryAssertionGroupFinalStep>.withExplanatoryAssertions(translatable: Translatable, arg: Any, vararg otherArgs: Any): ExplanatoryAssertionGroupFinalStep
Creates the AssertionGroup with the previously specified AssertionsOption.groupType using the given translatable -- which is used in an TranslatableWithArgs together with the given arguments (arg and optionally otherArgs) -- to create an ExplanatoryAssertion which is used as single Assertion in AssertionGroup.assertions. |