Пример #1
0
        internal static Task VerifyCSharpDiagnosticAsync(LanguageVersion languageVersion, string fileName, string source, DiagnosticResult[] expected, CancellationToken cancellationToken)
        {
            var test = new StyleCopCodeFixVerifier <SA1649FileNameMustMatchTypeName, SA1649CodeFixProvider> .CSharpTest(languageVersion)
            {
                TestSources = { (fileName, source) },
            };

            test.ExpectedDiagnostics.AddRange(expected);
            return(test.RunAsync(cancellationToken));
        }
Пример #2
0
 internal static Task VerifyCSharpFixAsync(LanguageVersion languageVersion, string oldFileName, string source, string testSettings, DiagnosticResult[] expected, string newFileName, string fixedSource, CancellationToken cancellationToken)
 {
     var test = new StyleCopCodeFixVerifier <SA1649FileNameMustMatchTypeName, SA1649CodeFixProvider> .CSharpTest(languageVersion)
     {
         TestSources  = { (oldFileName, source) },