-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Corniel Nobel
committed
Jun 6, 2023
1 parent
f985623
commit c6c0762
Showing
13 changed files
with
496 additions
and
495 deletions.
There are no files selected for viewing
227 changes: 0 additions & 227 deletions
227
src/Qowaiv.DomainModel.TestTools/AggregateRootAssert.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
src/Qowaiv.DomainModel.TestTools/Extensions/QowaivDomainModelFluentAssertions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Qowaiv.DomainModel; | ||
using Qowaiv.DomainModel.TestTools.FluentAssertions; | ||
using System.Diagnostics.Contracts; | ||
|
||
namespace FluentAssertions; | ||
|
||
/// <summary>Contains extension methods for custom assertions in unit tests.</summary> | ||
[DebuggerNonUserCode] | ||
public static class QowaivDomainModelFluentAssertions | ||
{ | ||
/// <summary> | ||
/// Returns an <see cref="AggregateAssertions{TAggregate, TId}"/> object that can be used to assert the | ||
/// current aggregate. | ||
/// </summary> | ||
/// <typeparam name="TAggregate"> | ||
/// The type of the aggregate. | ||
/// </typeparam> | ||
/// <typeparam name="TId"> | ||
/// The type of the identifier of the aggregate. | ||
/// </typeparam> | ||
[Pure] | ||
[CLSCompliant(false)] | ||
public static AggregateAssertions<TAggregate, TId> Should<TAggregate, TId>(this TAggregate? aggregate) | ||
where TAggregate : AggregateRoot<TAggregate, TId>, new() => new(aggregate); | ||
|
||
/// <summary> | ||
/// Returns an <see cref="EventBufferAssertions{TId}"/> object that can be used to assert the | ||
/// current event buffer. | ||
/// </summary> | ||
/// <typeparam name="TId"> | ||
/// The type of the identifier of the event buffer. | ||
/// </typeparam> | ||
[Pure] | ||
[CLSCompliant(false)] | ||
public static EventBufferAssertions<TId> Should<TId>(this EventBuffer<TId> buffer) => new(buffer); | ||
} |
Oops, something went wrong.