object AtriumFactory : IAtriumFactory
A dummy implementation of IAtriumFactory which should be replaced by an actual implementation.
It provides factory methods which all throw an UnsupportedOperationException to create:
fun newAssertionFormatterController(): IAssertionFormatterController
Creates an IAssertionFormatterController which all be used per default for newAssertionFormatterFacade. |
|
fun newAssertionFormatterFacade(assertionFormatterController: IAssertionFormatterController): IAssertionFormatterFacade
Creates an IAssertionFormatterFacade which shall be used per default for newOnlyFailureReporter. |
|
fun <T : Any> newCheckingPlant(subject: T): ICheckingAssertionPlant<T>
Creates an ICheckingAssertionPlant which provides a method to check whether allAssertionsHold. |
|
fun <T : Any> newCollectingPlant(subjectProvider: () -> T): ICollectingAssertionPlant<T>
Creates an ICollectingAssertionPlant which is intended to be used as receiver object in lambdas to collect created IAssertions inside the lambda. |
|
fun <T> newDelegatingAssertionChecker(subjectPlant: IBaseAssertionPlant<T, *>): IAssertionChecker
Creates an IAssertionChecker which delegates the checking of IAssertions to the given subjectPlant by adding (see IAssertionPlant.addAssertion) the assertions to the given subjectPlant. |
|
fun newDetailedObjectFormatter(translator: ITranslator): IObjectFormatter
Creates an IObjectFormatter which represents objects by using their Object.toString representation including Class.name and their System.identityHashCode. |
|
fun <T : Any> newFeatureAssertionChecker(subjectPlant: IAssertionPlant<T>): IAssertionChecker
Creates an IAssertionChecker which creates an IAssertionGroup of type IFeatureAssertionGroupType instead of checking assertions and delegates this task to the given subjectPlant by adding (see IAssertionPlant.addAssertion) the created assertion group to it. |
|
fun newMethodCallFormatter(): IMethodCallFormatter
Creates an IMethodCallFormatter which represents arguments of a method call by using their Object.toString representation with the exception of: |
|
fun newOnlyFailureReporter(assertionFormatterFacade: IAssertionFormatterFacade): IReporter
Creates an IReporter which reports only failing assertions and uses the given assertionFormatterFacade to format assertions and messages. |
|
fun <T : Any> newReportingPlant(commonFields: CommonFields<T>): IReportingAssertionPlant<T>
Creates an IReportingAssertionPlant which checks and reports added IAssertions. |
|
fun <T> newReportingPlantNullable(commonFields: CommonFields<T>): IReportingAssertionPlantNullable<T>
Creates an IReportingAssertionPlantNullable which is the entry point for assertions about nullable types. |
|
fun newTextExplanatoryAssertionGroupFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController): IAssertionFormatter
Creates an IAssertionFormatter which is intended for text output (e.g. for the console) and formats IAssertionGroups of type IExplanatoryAssertionGroupType by creating an AssertionFormatterMethodObject which indicates that formatting its IAssertionGroup.assertions happens within an explanatory assertion group. |
|
fun newTextFallbackAssertionFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController, objectFormatter: IObjectFormatter, translator: ITranslator): IAssertionFormatter
Creates an IAssertionFormatter which is intended for text output (e.g. for the console) and serves as fallback if no other formatter is able to format a given IAssertion. |
|
fun newTextFeatureAssertionGroupFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController, objectFormatter: IObjectFormatter, translator: ITranslator): IAssertionFormatter
Creates an IAssertionFormatter which is intended for text output (e.g. for the console) and formats IAssertionGroups of type IFeatureAssertionGroupType. |
|
fun newTextListAssertionGroupFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController, objectFormatter: IObjectFormatter, translator: ITranslator): IAssertionFormatter
Creates an IAssertionFormatter which is intended for text output (e.g. for the console) and formats IAssertionGroups of type IListAssertionGroupType. |
|
fun newThrowingAssertionChecker(reporter: IReporter): IAssertionChecker
Creates an IAssertionChecker which throws AssertionErrors in case an assertion fails and uses the given reporter for reporting. |
|
fun newTranslator(translationSupplier: ITranslationSupplier, primaryLocale: Locale, vararg fallbackLocales: Locale): ITranslator
Creates an ITranslator which translates ITranslatables to primaryLocale and falls back to fallbackLocales (in the given order) in case no translation exists for primaryLocale. |
|
fun registerSameLineTextAssertionFormatterCapabilities(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterFacade: IAssertionFormatterFacade, objectFormatter: IObjectFormatter, translator: ITranslator): Unit
Registers all available IAssertionFormatters -- which put assertion pairs on the same line and report in text format (e.g. for the console) -- to the given assertionFormatterFacade. |
open fun <T : Any> newReportingPlant(assertionVerb: ITranslatable, subject: T, reporter: IReporter): IReportingAssertionPlant<T> open fun <T : Any> newReportingPlant(assertionVerb: ITranslatable, subject: T, assertionChecker: IAssertionChecker): IReportingAssertionPlant<T>
Creates an IReportingAssertionPlant which checks and reports added IAssertions. |
|
open fun <T : Any> newReportingPlantAndAddAssertionsCreatedBy(assertionVerb: ITranslatable, subject: T, reporter: IReporter, assertionCreator: IAssertionPlant<T>.() -> Unit): IAssertionPlant<T>
Creates an IReportingAssertionPlant which IAssertionPlant.addAssertionsCreatedBy the given assertionCreator lambda where the created IAssertions are added as a group and usually (depending on the configured IReporter) reported as a whole. |
|
open fun <T> newReportingPlantNullable(assertionVerb: ITranslatable, subject: T, reporter: IReporter, nullRepresentation: Any = RawString.NULL): IReportingAssertionPlantNullable<T> open fun <T> newReportingPlantNullable(assertionVerb: ITranslatable, subject: T, assertionChecker: IAssertionChecker, nullRepresentation: Any): IReportingAssertionPlantNullable<T>
Creates an IReportingAssertionPlantNullable which is the entry point for assertions about nullable types. |