.NETStandard2.0
Instantly start coding roslyn analyzer tests, without having to prepare a new derived class for every test flavor.
Published
Apr 20, 2023
3y ago
Total Downloads
6.4K
6,377
Install
dotnet add package AnalyzerTesting.CSharp.Extensions --version 1.0.0-beta4
| Product | Versions |
|---|---|
| .NET Standard |
README
Roslyn analyzer testing extensions
Instantly start coding roslyn analyzer tests, without having to prepare a new derived class for every test flavor.
This project provides solution transforms and extension methods to simpify testing of roslyn analyzers and to ease configuration of the compilation like adding references or changing language version.
It also provides base classes to test incremental generators and diagnostic suppressors with "Microsoft.CodeAnalysis.CSharp.Analyzer.Testing version 1.1.1 and Microsoft.CodeAnalysis.CSharp.Workspaces >= 4.3.0
- Predefined solution transforms to fine tune the test when using object initializer notation
- Extension methods to configure the test using fluent notation
- An
IncrementalSourceGeneratortest to test incremental source generators with"Microsoft.CodeAnalysis.CSharp.Analyzer.Testingversion1.1.1 - An
IncrementalSourceGeneratortest that supports snapshot testing - A
DiagnosticSuppressortest to test diagnostic suppressors withMicrosoft.CodeAnalysis.CSharp.Workspaces>=4.3.0
Changes from Previous Version
v1.0.0-beta3v1.0.0-beta4
Added Dependencies
Microsoft.CodeAnalysis.CSharp.CodeFix.Testing(.NETStandard2.0)
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.