interface IAtriumFactory
The minimum contract of the 'abstract factory' of atrium.
It provides factory methods to create:
| abstract fun newAssertionFormatterController(): IAssertionFormatterControllerCreates an IAssertionFormatterController which all be used per default for newAssertionFormatterFacade. | |
| abstract fun newAssertionFormatterFacade(assertionFormatterController: IAssertionFormatterController): IAssertionFormatterFacadeCreates an IAssertionFormatterFacade which shall be used per default for newOnlyFailureReporter. | |
| abstract fun <T : Any> newCheckingPlant(subject: T): ICheckingAssertionPlant<T>Creates an ICheckingAssertionPlant which provides a method to check whether allAssertionsHold. | |
| abstract 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. | |
| abstract fun <T> newDelegatingAssertionChecker(subjectPlant: IBaseAssertionPlant<T, *>): IAssertionCheckerCreates an IAssertionChecker which delegates the checking of IAssertions to the given subjectPlant by adding (see IAssertionPlant.addAssertion) the assertions to the given subjectPlant. | |
| abstract fun newDetailedObjectFormatter(translator: ITranslator): IObjectFormatterCreates an IObjectFormatter which represents objects by using their Object.toString representation including Class.name and their System.identityHashCode. | |
| abstract fun <T : Any> newFeatureAssertionChecker(subjectPlant: IAssertionPlant<T>): IAssertionCheckerCreates 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. | |
| abstract fun newMethodCallFormatter(): IMethodCallFormatterCreates an IMethodCallFormatter which represents arguments of a method call by using their Object.toString representation with the exception of: | |
| abstract fun newOnlyFailureReporter(assertionFormatterFacade: IAssertionFormatterFacade): IReporterCreates an IReporter which reports only failing assertions and uses the given assertionFormatterFacade to format assertions and messages. | |
| 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>abstract fun <T : Any> newReportingPlant(commonFields: CommonFields<T>): 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>abstract fun <T> newReportingPlantNullable(commonFields: CommonFields<T>): IReportingAssertionPlantNullable<T>Creates an IReportingAssertionPlantNullable which is the entry point for assertions about nullable types. | |
| abstract fun newTextExplanatoryAssertionGroupFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController): IAssertionFormatterCreates 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. | |
| abstract fun newTextFallbackAssertionFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController, objectFormatter: IObjectFormatter, translator: ITranslator): IAssertionFormatterCreates 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. | |
| abstract fun newTextFeatureAssertionGroupFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController, objectFormatter: IObjectFormatter, translator: ITranslator): IAssertionFormatterCreates an IAssertionFormatter which is intended for text output (e.g. for the console) and formats IAssertionGroups of type IFeatureAssertionGroupType. | |
| abstract fun newTextListAssertionGroupFormatter(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterController: IAssertionFormatterController, objectFormatter: IObjectFormatter, translator: ITranslator): IAssertionFormatterCreates an IAssertionFormatter which is intended for text output (e.g. for the console) and formats IAssertionGroups of type IListAssertionGroupType. | |
| abstract fun newThrowingAssertionChecker(reporter: IReporter): IAssertionCheckerCreates an IAssertionChecker which throws AssertionErrors in case an assertion fails and uses the given reporter for reporting. | |
| abstract fun newTranslator(translationSupplier: ITranslationSupplier, primaryLocale: Locale, vararg fallbackLocales: Locale): ITranslatorCreates an ITranslator which translates ITranslatables to primaryLocale and falls back to fallbackLocales (in the given order) in case no translation exists for primaryLocale. | |
| abstract fun registerSameLineTextAssertionFormatterCapabilities(bulletPoints: Map<Class<out IBulletPointIdentifier>, String>, assertionFormatterFacade: IAssertionFormatterFacade, objectFormatter: IObjectFormatter, translator: ITranslator): UnitRegisters 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. | 
| object AtriumFactory : IAtriumFactoryA dummy implementation of IAtriumFactory which should be replaced by an actual implementation. |