Skip to content

Add integration coverage for lightweight roots with args and generics#139

Open
NikolayPianikov wants to merge 15 commits intodevfrom
codex/add-integration-tests-for-lightweight-roots
Open

Add integration coverage for lightweight roots with args and generics#139
NikolayPianikov wants to merge 15 commits intodevfrom
codex/add-integration-tests-for-lightweight-roots

Conversation

@NikolayPianikov
Copy link
Member

Motivation

  • Provide comprehensive integration coverage for the extended RootKinds.Light behavior to ensure lightweight roots support root arguments and generic type parameters and their combinations.
  • Capture behavior across positive and negative scenarios, including tagged/named arguments, multiple arguments, nested generics, generic constraints, static/exposed roots, and different visibility modifiers.

Description

  • Replaced/expanded the test file tests/Pure.DI.IntegrationTests/LightweightRootsTests.cs with ~32 xUnit tests covering lightweight roots with single/multiple root arguments, named and tagged args, and max-arity (Func<...> limits).
  • Added generic scenarios: single and multiple generic parameters, nested generics, and generic constraints (class, struct, new()), plus combinations of generics with root arguments and different marker types (TT, TT1, TT2, TT3).
  • Added edge-case tests for Static | Light, Exposed | Light, and visibility combinations (Public, Internal, Private, Protected) as well as negative tests that assert compilation/runtime failures for wrong argument types, missing arguments, and violated generic constraints.
  • Tests follow the existing pattern using [Fact], RunAsync(), Options for language/version control, and Given/When/Then comments, and assert both result.Success and result.StdOut where applicable.

Testing

  • Attempted to run the integration test suite locally with dotnet test, but the command failed in this environment because the dotnet runtime is not available (execution error: bash: command not found: dotnet).
  • No automated test execution was completed in this environment; the new tests are constructed to run under CI or a local environment with the .NET SDK and will exercise compilation and runtime behavior via RunAsync() when executed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 participant