doc / ch.tutteli.atrium.reporting / ReporterBuilder

ReporterBuilder

class ReporterBuilder

A builder to create a Reporter consisting of several components.

Types

AssertionFormatterChosenOptions

class AssertionFormatterChosenOptions

AssertionFormatterControllerOptions

class AssertionFormatterControllerOptions

Provides options to create an AssertionFormatterController.

AssertionFormatterFacadeOptions

class AssertionFormatterFacadeOptions

Provides options to create an AssertionFormatterFacade.

AssertionPairFormatterOptions

class AssertionPairFormatterOptions

Provides options to create an AssertionPairFormatter.

LocaleOrderDeciderOptions

class LocaleOrderDeciderOptions

ObjectFormatterOptions

class ObjectFormatterOptions

Provides options to create an ObjectFormatter.

TextAssertionFormatterOptions

class TextAssertionFormatterOptions

Provides options to register AssertionFormatters to the chosen AssertionFormatterFacade.

TranslatorOptions

class TranslatorOptions

Constructors

<init>

ReporterBuilder(assertionFormatterFacade: AssertionFormatterFacade)

A builder to create a Reporter consisting of several components.

Functions

buildCustomReporter

fun buildCustomReporter(factory: (AssertionFormatterFacade) -> Reporter): Reporter

Uses the given factory to build a custom Reporter.

buildOnlyFailureReporter

fun buildOnlyFailureReporter(): Reporter

Uses AtriumFactory.newOnlyFailureReporter as Reporter.

Companion Object Functions

withDefaultTranslationSupplier

fun withDefaultTranslationSupplier(): LocaleOrderDeciderOptions

Uses AtriumFactory.newPropertiesBasedTranslationSupplier as TranslationSupplier.

withTranslationSupplier

fun withTranslationSupplier(translationSupplier: TranslationSupplier): LocaleOrderDeciderOptions

Uses the given translationSupplier as TranslationSupplier.

withTranslator

fun withTranslator(translator: Translator): ObjectFormatterOptions

Uses the given translator as Translator skipping the options for TranslationSupplier and LocaleOrderDecider assuming the given translator is implemented differently -- use withDefaultTranslationSupplier or withTranslationSupplier in case the given translator requires a TranslationSupplier or a LocaleOrderDecider.

withoutTranslations

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

Uses UsingDefaultTranslator as Translator where the given primaryLocale is used to format arguments of TranslatableWithArgs.