diff --git a/FlowMediator/FlowMediator.csproj b/FlowMediator/FlowMediator.csproj index d530f18..2d1333c 100644 --- a/FlowMediator/FlowMediator.csproj +++ b/FlowMediator/FlowMediator.csproj @@ -3,18 +3,20 @@ net9.0;net8.0 true - 1.0.0 + 1.2.0 FlowMediator berk2k - A lightweight mediator library with pipeline behaviors for .NET 8/9. + FlowMediator is a lightweight mediator library with pipeline behaviors and domain events for .NET 8/9. Ideal for hobby projects, or learning CQRS patterns without the complexity of bigger frameworks. - Provides request/response messaging and pipeline behaviors like logging and validation with minimal setup. + Provides request/response messaging, pipeline behaviors (logging, validation), and EF Core domain event support. - mediator cqrs pipeline .net lightweight hobby + mediator cqrs pipeline domain-events .net lightweight hobby https://github.com/berk2k/FlowMediator https://github.com/berk2k/FlowMediator - Initial 1.0.0 release: core mediator, pipeline behaviors, DI integration. + + v1.2.0 - Added Domain Event support with EF Core integration. Improved README and documentation. + README.md MIT enable diff --git a/tests/FlowMediator.Tests/DomainEventTests.cs b/tests/FlowMediator.Tests/DomainEventTests.cs index 148d98f..7521afc 100644 --- a/tests/FlowMediator.Tests/DomainEventTests.cs +++ b/tests/FlowMediator.Tests/DomainEventTests.cs @@ -11,7 +11,7 @@ public class DomainEventTests public async Task Should_Handle_DomainEvent_When_EntityCreated() { // Arrange - var services = new ServiceCollection(); + IServiceCollection services = new ServiceCollection(); services.AddFlowMediator(typeof(DomainEventTests).Assembly); var provider = services.BuildServiceProvider(); var mediator = provider.GetRequiredService(); @@ -27,5 +27,4 @@ public async Task Should_Handle_DomainEvent_When_EntityCreated() Assert.Single(entity.DomainEvents); } } - } diff --git a/tests/FlowMediator.Tests/FlowMediator.Tests.csproj b/tests/FlowMediator.Tests/FlowMediator.Tests.csproj index aae85d5..d4aa388 100644 --- a/tests/FlowMediator.Tests/FlowMediator.Tests.csproj +++ b/tests/FlowMediator.Tests/FlowMediator.Tests.csproj @@ -9,7 +9,6 @@ - diff --git a/tests/FlowMediator.Tests/MediatorTest.cs b/tests/FlowMediator.Tests/MediatorTest.cs index 5273715..29b3157 100644 --- a/tests/FlowMediator.Tests/MediatorTest.cs +++ b/tests/FlowMediator.Tests/MediatorTest.cs @@ -1,27 +1,22 @@ using FlowMediator.Contracts; using FlowMediator.Extensions; -using FluentAssertions; using Microsoft.Extensions.DependencyInjection; namespace FlowMediator.Tests { - public class MediatorTests { [Fact] public async Task SendAsync_Should_Invoke_Handler() { - // Arrange var services = new ServiceCollection(); services.AddFlowMediator(typeof(MediatorTests).Assembly); var provider = services.BuildServiceProvider(); var mediator = provider.GetRequiredService(); - // Act var result = await mediator.SendAsync(new Ping()); - // Assert - result.Should().Be("Pong"); + Assert.Equal("Pong", result); } [Fact] @@ -44,5 +39,4 @@ public class PingHandler : IRequestHandler public Task Handle(Ping request, CancellationToken cancellationToken) => Task.FromResult("Pong"); } - }