Closed jerone closed 8 months ago
The API has been extended to allow for providing additional files https://github.com/cezarypiatek/RoslynTestKit/blob/master/src/RoslynTestKit/BaseTestFixture.cs#L19
sample usage
[Test]
public void should_verify_analyzer()
{
var fixture = RoslynFixtureFactory.Create<SampleAnalyzer>(new () {
AdditionalFiles= new []{
new AnalyzerAdditionalFile("my_settings_file.json")
};
});
//TODO: test your analyzer
}
This looks like exactly what was needed. Thanks.
For testing purposes I want to define my own
AdditionalFiles
andAdditionalDocuments
.It appears to be possible via
DiagnosticAnalyzerExtensions.WithAnalyzers
method, third parameteranalysisOptions
, propertyAnalyzerOptions.AdditionalFiles
. See https://stackoverflow.com/a/34052279/108448Would it be possible to support this feature...