Skip to content

Feature/project update#3

Merged
GabrieleTronchin merged 32 commits into
mainfrom
feature/project-update
Apr 22, 2026
Merged

Feature/project update#3
GabrieleTronchin merged 32 commits into
mainfrom
feature/project-update

Conversation

@GabrieleTronchin

Copy link
Copy Markdown
Owner

No description provided.

Tronchin, Gabriele added 30 commits April 17, 2026 17:36
- Create Domain.Tests, Persistence.Tests, and API Tests projects (xUnit, FsCheck, FluentAssertions, NSubstitute)
- Add FsCheck Arbitrary generators for domain types
- Add unit and property tests for DomainEventManager (Properties 1-2)
- Add unit and property tests for OrderEntity (Properties 3-6)
- Add unit and property tests for ProductEntity (Properties 7-9)
- Add unit and property tests for OrderDomainEventInterceptor (Properties 10-11)
- Add unit and property tests for OutboxMessageProcessorJob (Property 12)
- 38 tests total: 26 unit + 12 property-based
- Upgrade MediatR from 12.4.1 to 14.1.0
- Upgrade Quartz and Quartz.Extensions.Hosting to 3.18.0
- Upgrade Newtonsoft.Json to 13.0.4
- Upgrade Microsoft.EntityFrameworkCore.InMemory to 9.0.15
- Upgrade Microsoft.AspNetCore.OpenApi to 9.0.15
- Upgrade Microsoft.Extensions.Logging.Abstractions to 10.0.6
- Replace Swashbuckle.AspNetCore with Scalar.AspNetCore 2.2.7
- Remove deprecated Microsoft.AspNetCore.Http.Abstractions
- Add FrameworkReference to Microsoft.AspNetCore.App in Persistence
- Update Program.cs: AddOpenApi, MapOpenApi, MapScalarApiReference
- Rewrite README.md with professional structure and Mermaid diagram
- Add Table of Contents, Project Structure, API Endpoints tables
- Add Package Versions table with updated versions
- Add Scalar API Reference section
- Create docs/ folder with component deep-dive files:
  - docs/domain-event-manager.md
  - docs/outbox-interceptor.md
  - docs/outbox-processor-job.md
- Delete assets/ folder (screenshots no longer referenced)
- Add @host variable for base URL
- Add GET /Products, GET /Orders, POST /PurchaseOrder/{id}
- Add descriptive comments for each request with expected responses
- Follow logical test flow order: Products -> Orders -> PurchaseOrder
MediatR 13.0.0+ moved to commercial RPL-1.5 license. Downgraded to 12.5.0, the last Apache-2.0 release. Added licensing constraints to steering to prevent future use of paid packages.
Runs on PRs targeting main and pushes to main. Restores, builds in Release, runs all tests, and uploads test results as artifacts.
- IInboxMessage interface extending MediatR INotification
- MessageTypeRegistry for string-to-CLR-type mapping
- PaymentConfirmedInboxMessage record
- IInboxMessageRepository interface for idempotent inbox receive
- Property 3: register-then-resolve round-trip
- Property 4: unregistered keys return null
- Uses FsCheck.Xunit with 100 iterations each
- Internal implementation of IInboxMessageRepository
- Duplicate check via AsNoTracking().AnyAsync()
- Registered as transient in ServicesExtensions.AddPersistence()
- InternalsVisibleTo for test project
- Property 1: persistence round-trip (fields match input, ReceivedAt set)
- Property 2: receive idempotency (true then false, single entity)
- Uses in-memory EF Core provider with isolated databases
- IEndpoint interface and ServiceExtension for assembly scanning
- ProductsEndpoint, OrdersEndpoint, InboxEndpoint classes
- Request DTOs moved to Contracts/ folder
- All existing routes, status codes, and Swagger metadata preserved
- Replace switch statement with MessageTypeRegistry + IPublisher
- Add PaymentConfirmedHandler (INotificationHandler)
- Clean up Program.cs: remove inline endpoints, wire AddEndpoints/MapEndpoints
- Register MessageTypeRegistry as singleton
- MediatR scans Domain assembly for inbox handlers
- Property 5: deserialization round-trip
- Property 6: error handling preserves error details
- Property 7: skips already-processed messages
- Unit tests: unknown MessageType, batch limit of 10, empty OrderId
- Requirements, design, and implementation tasks
- 7 correctness properties defined
- Covers endpoint extraction and MediatR-based inbox processing
Tronchin, Gabriele added 2 commits April 20, 2026 10:40
- inbox-processor-job.md: rewrite to reflect MessageTypeRegistry + MediatR
  dispatch, remove obsolete switch/HandlePaymentConfirmed sections, update
  dependencies and design decisions
- README.md: update inbox sequence diagram with MediatR flow, add missing
  POST /Orders endpoint, update project descriptions, add new key components
  (MessageTypeRegistry, IEndpoint, IInboxMessageRepository)
The project uses MediatR 12.5.0, the last Apache-2.0 licensed version.
Versions 13.0.0+ use a commercial license (RPL-1.5) and are not allowed.
@GabrieleTronchin GabrieleTronchin merged commit 041c51d into main Apr 22, 2026
1 check passed
@GabrieleTronchin GabrieleTronchin deleted the feature/project-update branch April 22, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant