doc / ch.tutteli.atrium.reporting / ReporterBuilder

ReporterBuilder

class ReporterBuilder

A builder to create a Reporter consisting of several components.

Types

AssertionFormatterControllerOptions

class AssertionFormatterControllerOptions

Provides options to create an AssertionFormatterController.

AssertionFormatterFacadeOptions

class AssertionFormatterFacadeOptions

Provides options to create an AssertionFormatterFacade.

AssertionFormatterOptions

class AssertionFormatterOptions

Provides options to register AssertionFormatters to the chosen AssertionFormatterFacade.

LocaleOrderDeciderOptions

class LocaleOrderDeciderOptions

ObjectFormatterOptions

class ObjectFormatterOptions

Provides options to create an ObjectFormatter.

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.

withDetailedObjectFormatter

fun withDetailedObjectFormatter(): AssertionFormatterOptions

Deprecated do not use it any longer and replace it with suggestion instead.

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.