Skip to main content
Table of Contents

Class Aggregate

Namespace
Stratara.Testing
Assembly
Stratara.Testing.dll

One-line shortcuts for rehydrating an aggregate from events in tests.

public static class Aggregate
Inheritance
Aggregate
Inherited Members

Methods

Rehydrate<TAggregate>(IEnumerable<object>)

Rehydrate TAggregate from an event sequence.

public static TAggregate Rehydrate<TAggregate>(IEnumerable<object> events) where TAggregate : class, new()

Parameters

events IEnumerable<object>

The events to apply, in order.

Returns

TAggregate

The rehydrated aggregate.

Type Parameters

TAggregate

The aggregate type — must have a public parameterless constructor.

Rehydrate<TAggregate>(params object[])

Rehydrate TAggregate from events.

public static TAggregate Rehydrate<TAggregate>(params object[] events) where TAggregate : class, new()

Parameters

events object[]

The events to apply, in order.

Returns

TAggregate

The rehydrated aggregate.

Type Parameters

TAggregate

The aggregate type — must have a public parameterless constructor.