Migrate from MediatR to TimeWarp.Mediator and modernize codebase#567
Merged
StevenTCramer merged 23 commits intoJan 22, 2026
Merged
Conversation
- Create tests/client-integration-tests/store/ directory - Add store-lifecycle-tests.cs with 8 tests covering: - GetState: same instance on repeated calls, different instances for different types, initialization on first access - Reset: creates new instance after reset - RemoveState: creates new instance after removal - PreviousState: null before actions, tracks state after action, new Guid after action - Add global using for Blue namespace - All tests passing
- Create tests/client-integration-tests/subscriptions/ directory - Add subscriptions-tests.cs with 6 tests covering: - Add subscription and trigger re-render - Prevent duplicate subscriptions for same component/state - Remove all subscriptions for a component - Respect ShouldReRender return value - Only re-render matching state type subscribers - Re-render multiple components for same state - Add Subscriptions property to BaseTest - Add Counter namespace to global-usings.cs - All 6 tests passing (previously zero coverage)
- Create tests/client-integration-tests/pipeline/ directory - Add state-transaction-tests.cs with 5 tests covering: - Clone state before handler executes - Preserve changes on successful action - Rollback state on exception - Publish exception notification on exception - Continue working after exception - All 5 tests passing
- Create action-tracking-tests.cs in pipeline/ directory with 4 tests: - NotBeActive_Initially - TrackAction_DuringExecution - ReturnFalse_ForUnknownActionType - TrackMultipleActions_Independently - Update testing-convention.cs to include TimeWarp.State.Plus assembly and ActiveActionBehavior - Add ActionTracking and Purple namespaces to global-usings.cs - Fix flaky store lifecycle test affected by test execution order - All 4 action tracking tests passing
- Create tests/client-integration-tests/caching/ directory - Add cacheable-state-tests.cs with 4 tests: - HaveNullCacheKey_Initially - SetCacheKey_AfterFetch - SetTimestamp_AfterFetch - ReturnCachedData_WhenCacheValid - All 4 tests passing
- Create render-subscription-context-tests.cs in pipeline/ directory with 4 tests: - ReturnTrue_ForUnregisteredAction - ReturnFalse_WhenRegisteredWithFalse - ReturnTrue_WhenRegisteredWithTrue - ReturnTrue_AfterReset - Add RenderSubscriptionContext property to BaseTest - Add global using for TimeWarp.Features.RenderSubscriptions - All 4 tests passing
Update package references to migrate from TimeWarp.Mediator to the martinothamar/Mediator library: - Directory.Packages.props: Add Mediator.Abstractions and Mediator.SourceGenerator 3.0.1 - timewarp-state.csproj: Replace TimeWarp.Mediator with Mediator packages - test-app-contracts.csproj: Replace TimeWarp.Mediator with Mediator.Abstractions - Use explicit versions (3.0.1) due to CPM NU1011 floating version restriction Also standardize kanban placeholder files to .gitkeep convention
StevenTCramer
deleted the
Cramer/2025-08-12/032migrate-from-mediatr-to-timewarp-mediator
branch
January 22, 2026 18:57
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key Changes
Breaking Changes