Skip to content

test: cover SchedulerConfigurationBuilder ScheduleFunc lambdas#53

Merged
Theauxm merged 1 commit intomainfrom
test/coverage-edge-cases
May 5, 2026
Merged

test: cover SchedulerConfigurationBuilder ScheduleFunc lambdas#53
Theauxm merged 1 commit intomainfrom
test/coverage-edge-cases

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 5, 2026

Summary

The lambdas inside `SchedulerConfigurationBuilder.Schedule<,,>`, `ScheduleOnce<,,>`, and `Include<,,>` (the closures that capture the train's generic type parameters and route to the matching `ITraxScheduler` method) were never invoked in the existing config-only builder tests, leaving each closure body uncovered.

This PR builds a configuration via the public surface, then invokes the resulting `PendingManifest.ScheduleFunc` against an NSubstitute `ITraxScheduler` and verifies the call routes to the expected scheduler method with the captured arguments. Three closures covered: `Schedule` → `ScheduleAsync`, `ScheduleOnce` → `ScheduleOnceAsync`, `Include` → `ScheduleDependentAsync`.

NSubstitute is added as a test-project dependency (already in use in the rest of the workspace).

The remaining gaps to 95% line coverage are in postgres-backed polling services and junctions (EnqueueJobsJunction, ManifestManagerPollingService, DataContextExtensions, JobRunnerExtensions endpoint lambdas) which need full DB-backed integration scaffolding.

Test plan

  • `dotnet test` — passing (3 new)
  • `dotnet csharpier check .` — clean

…nc lambdas to cover the Schedule / ScheduleOnce / Include closure bodies
@Theauxm Theauxm merged commit 63e787e into main May 5, 2026
1 check passed
@Theauxm Theauxm deleted the test/coverage-edge-cases branch May 5, 2026 18:57
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented May 8, 2026

This PR is included in version 1.29.0

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