Lightlines
By dotnet

generate-testability-wrappers

dotnet2.4k installs

Static dependencies, ready for deterministic tests.

What it does

Generates wrapper interfaces, default implementations, and DI service registration code for untestable static dependencies.

When to use it

Use it after identifying statics to wrap, when replacing statics with injected abstractions, or when adopting the listed abstractions.

How to use it

Give it a project, static category, and target framework; it generates or guides the required abstraction, composition, and deterministic test artifacts in the project.

What you provide

  • static category
  • target framework
  • An existing project

Security reviews

Not yet reviewed.


What you need · 4

The package is required when adopting TimeProvider on .NET versions before .NET 8.

The testing package is required for the FakeTimeProvider test path.


Access · 2

This skill

System.IO.Abstractions

Execute

Installs System.IO.Abstractions

System.IO.Abstractions.TestingHelpers

Execute

Installs filesystem testing helpers