Fixed line numbers of diagnostic messages

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
This commit is contained in:
Whit Waldo 2025-06-21 04:28:26 -05:00
parent 7e0d1062a1
commit f765bf3d53
1 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ public class DaprJobsAnalyzerAnalyzerTests
""";
var expected = VerifyAnalyzer.Diagnostic(MapDaprScheduledJobHandlerAnalyzer.DaprJobHandlerRule)
.WithSpan(22, 25, 23, 83)
.WithSpan(23, 25, 24, 83)
.WithMessage(
"Job invocations require the MapDaprScheduledJobHandler be set and configured for job name 'myJob' on IEndpointRouteBuilder");
@ -124,11 +124,11 @@ public class DaprJobsAnalyzerAnalyzerTests
""";
var expected1 = VerifyAnalyzer.Diagnostic(MapDaprScheduledJobHandlerAnalyzer.DaprJobHandlerRule)
.WithSpan(22, 25, 23, 83)
.WithSpan(23, 25, 24, 83)
.WithMessage(
"Job invocations require the MapDaprScheduledJobHandler be set and configured for job name 'myJob' on IEndpointRouteBuilder");
var expected2 = VerifyAnalyzer.Diagnostic(MapDaprScheduledJobHandlerAnalyzer.DaprJobHandlerRule)
.WithSpan(24, 25, 25, 83)
.WithSpan(25, 25, 26, 83)
.WithMessage("Job invocations require the MapDaprScheduledJobHandler be set and configured for job name 'myJob2' on IEndpointRouteBuilder");
var analyzer = new VerifyAnalyzer(Utilities.GetReferences());
await analyzer.VerifyAnalyzerAsync<MapDaprScheduledJobHandlerAnalyzer>(testCode, expected1, expected2);