protected void VerifyCSharpWithDependencies(string source, FileAndSource additionalFile, params DiagnosticResult[] expected) { this.VerifyCSharp( new[] { source, MicrosoftAspNetCoreHttpNamespaceCSharpSourceCode }, additionalFile, ReferenceFlags.None, expected); }
protected void VerifyCSharpWithDependencies(string source, FileAndSource additionalFile, params DiagnosticResult[] expected) { this.VerifyCSharp( new[] { source, MicrosoftWindowsAzureStorageCSharpSourceCode }, additionalFile, ReferenceFlags.None, expected); }
protected async Task VerifyCSharpWithDependenciesAsync(string source, FileAndSource additionalFile, params DiagnosticResult[] expected) { var test = new CSharpSecurityCodeFixVerifier <TCSharpAnalyzer, EmptyCodeFixProvider> .Test { ReferenceAssemblies = AdditionalMetadataReferences.DefaultForTaintedDataAnalysis }; test.TestState.AdditionalReferences.Add(AdditionalMetadataReferences.TestReferenceAssembly); test.TestState.Sources.Add(source); if (AdditionalCSharpSources is object) { foreach (var additionalSource in AdditionalCSharpSources) { test.TestState.Sources.Add(additionalSource); } } test.TestState.AdditionalFiles.Add((additionalFile.FilePath, additionalFile.Source)); test.TestState.ExpectedDiagnostics.AddRange(expected); await test.RunAsync(); }
private void VerifyCSharpWithJsonNet(string source, FileAndSource additionalFile, params DiagnosticResult[] expected) { this.VerifyCSharpAcrossTwoAssemblies(NewtonsoftJsonNetApis.CSharp, source, additionalFile, expected); }