Skip to content

test: fill coverage gaps in mediator services#33

Merged
Theauxm merged 1 commit into
mainfrom
test/coverage-gap-tests
May 5, 2026
Merged

test: fill coverage gaps in mediator services#33
Theauxm merged 1 commit into
mainfrom
test/coverage-gap-tests

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 5, 2026

Summary

Adds targeted tests for areas that were sitting under 90% line coverage:

  • NullPrincipalProvider direct test (was 0%, never instantiated outside test-local copies)
  • Internal RegisterServiceTrains((Type,Type)[], lifetime) overload — Singleton/Scoped/invalid-lifetime branches
  • TrainExecutionService.QueueAsync (happy path, unknown train, oversized JSON, deserialize-null), and the missing-ITrainAuthorizationService fail-closed path
  • TrainDiscoveryService GraphQL metadata population for [TraxQuery] and [TraxMutation]

Local line coverage moved from ~92% to ~96% with these.

Test plan

  • dotnet test tests/Trax.Mediator.Tests.MemoryLeak.Integration — 240 passing (11 new)
  • dotnet test tests/Trax.Mediator.Tests.Postgres.Integration — 65 passing
  • dotnet csharpier check . — clean

…eueAsync, missing-auth and graphql discovery paths
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@Theauxm Theauxm merged commit 0988f8c into main May 5, 2026
2 checks passed
@Theauxm Theauxm deleted the test/coverage-gap-tests branch May 5, 2026 16:44
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