axon-kotlin / com.tylerthrailkill.axon_kotlin.axonframework.test.aggregate.dsl / AggregateTestFixtureBuilder

AggregateTestFixtureBuilder

class AggregateTestFixtureBuilder<T>

Builder for the DSL. Declares all methods that can be called in the context of the Aggregate FixtureConfiguration DSL

val fixture = AggregateTestFixture<StubAnnotatedAggregate>()

Parameters

aggregateTestFixture - takes in the FixtureConfiguration to build up

Types

AnyUnaryBuilder

class AnyUnaryBuilder

Block type that allows building up lists of any items. For use only in DSL method blocks

ExpectsBuilder

class ExpectsBuilder

Contains all valid methods for the AggregateTestFixtureBuilder.expect block

GivenBuilder

class GivenBuilder<T>

Contains all valid methods for the AggregateTestFixtureBuilder.given block Builds up a TestExecutor

RegisterBuilder

data class RegisterBuilder<T>

Class that contains all methods that are valid for the AggregateTestFixtureBuilder.register block

Constructors

<init>

AggregateTestFixtureBuilder(aggregateTestFixture: FixtureConfiguration<T>)

Builder for the DSL. Declares all methods that can be called in the context of the Aggregate FixtureConfiguration DSL

Properties

reportIllegalStateChange

var reportIllegalStateChange: Boolean

Allows setting the fixture using FixtureConfiguration.setReportIllegalStateChange

resultValidator

val resultValidator: ResultValidator

Used for retrieving the instance of the ResultValidator for usage outside the bounds of the DSL

testExecutor

lateinit var testExecutor: TestExecutor

Used for retrieving the instance of the TestExecutor for usage outside the bounds of the DSL

Functions

expect

fun expect(block: ExpectsBuilder.() -> Unit): ExpectsBuilder

Takes a block for running all expectations against the ResultValidator

given

fun given(block: GivenBuilder<T>.() -> Unit): TestExecutor

Takes a block to build up all the 'given' information for the FixtureConfiguration. Refer to GivenBuilder for all valid methods in this block.

register

fun register(block: RegisterBuilder<T>.() -> Unit): RegisterBuilder<T>

Registration block for the FixtureConfiguration. Refer to RegisterBuilder for all valid methods in this block.

whenever

fun whenever(block: () -> Any): ResultValidator

Takes a block for running a when situation against the FixtureConfiguration.