public void ClassPropertiesWithSetters_YieldsDiagnostics()
{
var commonExpected =
new DiagnosticResultCommonProperties(new AA1101ClassPropertiesShouldBePubliclyRead_OnlyAnalyzer());
var expected1 =
new DiagnosticResult(commonExpected,
Format(Resources.AA1101ClassPropertiesShouldBePubliclyReadOnlyMessageFormat,
"Property2",
"ContainsSetters"),
Option<DiagnosticLocation>.Some(new DiagnosticLocation(10, 38, 41)));
var expected2 =
new DiagnosticResult(commonExpected,
Format(Resources.AA1101ClassPropertiesShouldBePubliclyReadOnlyMessageFormat,
"Property7",
"ContainsSetters"),
Option<DiagnosticLocation>.Some(new DiagnosticLocation(20, 13, 16)));
DiagnosticVerifier.VerifyDiagnostics<AA1101ClassPropertiesShouldBePubliclyRead_OnlyAnalyzer>(
@"..\..\CodeUnderTest\CodeToTestClassPropertySetters.cs",
expected1,
expected2);
}
}