Inheritance: Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, IAnalyzerDetailsReporter, INamedItemSuppresionAttributeDetailsReporter
        public void BasicReassignmentsWithIncorrectlyIngoredParameters_YieldsDiagnostics()
        {
            var analyzer = new AA1300ParametersShouldNotBeModifiedAnalyzer();
            var analyzerCommonExpected = new DiagnosticResultCommonProperties(analyzer);
            var analyzerSuppressionCommonExpected =
                new DiagnosticResultCommonProperties(analyzer.GetNamedItemSuppresionAttributeDetails()[0]);

            var expected1 =
                new DiagnosticResult(analyzerSuppressionCommonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedSuppresionMisuseMessageFormat,
                                            "y"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(10, 27, 30)));

            var expected2 =
                new DiagnosticResult(analyzerSuppressionCommonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedSuppresionMisuseMessageFormat,
                                            "z"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(10, 32, 35)));

            var expected3 =
                new DiagnosticResult(analyzerCommonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(13, 13, 18)));

            var expected4 =
                new DiagnosticResult(analyzerCommonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "b"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(14, 13, 19)));

            var expected5 =
                new DiagnosticResult(analyzerCommonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "b"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(20, 17, 31)));

            DiagnosticVerifier.VerifyDiagnostics<AA1300ParametersShouldNotBeModifiedAnalyzer>(
                @"..\..\CodeUnderTest\CodeToTestParameterReassignment.cs",
                expected1,
                expected2,
                expected3,
                expected4,
                expected5);
        }
        public void NonSimpleIntReassignments_YieldsDiagnostics()
        {
            var analyzer = new AA1300ParametersShouldNotBeModifiedAnalyzer();
            var commonExpected = new DiagnosticResultCommonProperties(analyzer);

            var expected1 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(12, 13, 19)));

            var expected2 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(13, 13, 19)));

            var expected3 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(14, 13, 19)));

            var expected4 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(15, 13, 19)));

            var expected5 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(16, 13, 19)));

            var expected6 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(17, 13, 20)));

            var expected7 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(18, 13, 20)));

            var expected8 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(19, 13, 16)));

            var expected9 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(20, 13, 16)));

            var expected10 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(21, 13, 16)));

            var expected11 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "a"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(22, 13, 16)));

            DiagnosticVerifier.VerifyDiagnostics<AA1300ParametersShouldNotBeModifiedAnalyzer>(
                @"..\..\CodeUnderTest\CodeToTestNonSimpleIntParameterReassignments.cs",
                expected1,
                expected2,
                expected3,
                expected4,
                expected5,
                expected6,
                expected7,
                expected8,
                expected9,
                expected10,
                expected11);
        }
        public void BooleanReassignments_YieldsDiagnostics()
        {
            var analyzer = new AA1300ParametersShouldNotBeModifiedAnalyzer();
            var commonExpected = new DiagnosticResultCommonProperties(analyzer);

            var expected1 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "b"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(11, 13, 22)));

            var expected2 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "b"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(12, 13, 23)));

            var expected3 =
                new DiagnosticResult(commonExpected,
                                     Format(Resources.AA1300ParametersShouldNotBeModifiedMessageFormat,
                                            "b"),
                                     Option<DiagnosticLocation>.Some(new DiagnosticLocation(13, 13, 23)));

            DiagnosticVerifier.VerifyDiagnostics<AA1300ParametersShouldNotBeModifiedAnalyzer>(
                @"..\..\CodeUnderTest\CodeToTestBooleanParameterReassignments.cs",
                expected1,
                expected2,
                expected3);
        }