Arnolyzer.Tests.Analyzers.PureFunctionAnalyzersTests.AA1000StaticMethodsShouldNotBeVoidAnalyzerTests.CodeWithFourVoidMethodsTwoWithIgnoreRuleAttributes_YieldsTwoDiagnostic C# (CSharp) Метод

CodeWithFourVoidMethodsTwoWithIgnoreRuleAttributes_YieldsTwoDiagnostic() приватный Метод

        public void CodeWithFourVoidMethodsTwoWithIgnoreRuleAttributes_YieldsTwoDiagnostic()
        {
            var commonExpected = new DiagnosticResultCommonProperties(new AA1000StaticMethodsShouldNotBeVoidAnalyzer());
            var expected1 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1000StaticMethodsShouldNotBeVoidMessageFormat,
                                                   "DoNothing1"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(8, 28, 38)));

            var expected2 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1000StaticMethodsShouldNotBeVoidMessageFormat,
                                                   "DoNothing4"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(17, 28, 38)));

            DiagnosticVerifier.VerifyDiagnostics<AA1000StaticMethodsShouldNotBeVoidAnalyzer>(
                TestFiles.CodeToTestStaticVoidAnalyzerRespectsAttributes,
                expected1,
                expected2);
        }
    }