doc / ch.tutteli.atrium.reporting / ReporterBuilder

ReporterBuilder

class ReporterBuilder

A builder to create an IReporter consisting of several components.

Types

AssertionFormatterControllerOptions

class AssertionFormatterControllerOptions

Provides options to create an IAssertionFormatterController.

AssertionFormatterFacadeOptions

class AssertionFormatterFacadeOptions

Provides options to create an IAssertionFormatterFacade.

AssertionFormatterOptions

class AssertionFormatterOptions

Provides options to register IAssertionFormatters to the chosen IAssertionFormatterFacade.

ObjectFormatterOptions

class ObjectFormatterOptions

Provides options to create an IObjectFormatter.

Constructors

<init>

ReporterBuilder(assertionFormatterFacade: IAssertionFormatterFacade)

A builder to create an IReporter consisting of several components.

Functions

buildCustomReporter

fun buildCustomReporter(factory: (IAssertionFormatterFacade) -> IReporter): IReporter

Uses the given factory to build a custom IReporter.

buildOnlyFailureReporter

fun buildOnlyFailureReporter(): IReporter

Uses AtriumFactory.newOnlyFailureReporter as IReporter.

Companion Object Functions

withDetailedObjectFormatter

fun withDetailedObjectFormatter(): AssertionFormatterOptions

Shortcut for withoutTranslations.ObjectFormatterOptions.withDetailedObjectFormatter. AssertionFormatterControllerOptions.withDefaultAssertionFormatterController. AssertionFormatterFacadeOptions.withDefaultAssertionFormatterFacade -- uses UsingDefaultTranslator as ITranslator and AtriumFactory.newDetailedObjectFormatter as IObjectFormatter.

withTranslations

fun withTranslations(translationSupplier: ITranslationSupplier, locale: Locale, vararg fallbackLocales: Locale): ObjectFormatterOptions

Uses AtriumFactory.newTranslator with the given translationSupplier as ITranslator, uses locale as primary Locale and the optional fallbackLocales as fallback Locales.

withTranslator

fun withTranslator(translator: ITranslator): ObjectFormatterOptions

Uses the given translator as ITranslator.

withoutTranslations

fun withoutTranslations(primaryLocale: Locale = Locale.getDefault()): ObjectFormatterOptions

Uses UsingDefaultTranslator as ITranslator (which does not translate but uses the ITranslatable's getDefault) and the given primaryLocale which falls back to Locale.getDefault if not given.