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

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

private CodeWithTwoVoidMethods_YieldsTwoDiagnostics ( ) : void
Результат void
        public void CodeWithTwoVoidMethods_YieldsTwoDiagnostics()
        {
            var commonExpected = new DiagnosticResultCommonProperties(new AA1000StaticMethodsShouldNotBeVoidAnalyzer());
            var expected1 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1000StaticMethodsShouldNotBeVoidMessageFormat,
                                                   "DoNothing"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(5, 28, 37)));

            var expected2 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1000StaticMethodsShouldNotBeVoidMessageFormat,
                                                   "StillDoNothing"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(8, 28, 42)));

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