Skip to content

Commit

Permalink
Merge pull request #5253 from Particular/hotfix-7.1.3
Browse files Browse the repository at this point in the history
Hotfix 7.1.3
  • Loading branch information
andreasohlund authored Aug 30, 2018
2 parents b62c800 + 86867fe commit 4563c1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public class AwaitOrCaptureTasksAnalyzerTests : DiagnosticVerifier
[TestCase("IMessageSession", "obj.Unsubscribe(typeof(object));")]
[TestCase("IMessageSession", "obj.Unsubscribe<object>();")]

// ScheduleExtensions
[TestCase("IMessageSession", "obj.ScheduleEvery(TimeSpan.Zero, _ => Task.FromResult(0));")]
[TestCase("IMessageSession", "obj.ScheduleEvery(TimeSpan.Zero, \"name\", _ => Task.FromResult(0));")]

// Endpoint
[TestCase("EndpointConfiguration", "Endpoint.Create(obj);")]
[TestCase("EndpointConfiguration", "Endpoint.Start(obj);")]
Expand All @@ -70,7 +74,9 @@ public class AwaitOrCaptureTasksAnalyzerTests : DiagnosticVerifier
public Task DiagnosticIsReportedForCorePublicMethods(string type, string call)
{
var source =
$@"using NServiceBus;
$@"using NServiceBus;
using System;
using System.Threading.Tasks;
class Foo
{{
void Bar({type} obj)
Expand All @@ -83,7 +89,7 @@ void Bar({type} obj)
{
Id = "NSB0001",
Severity = DiagnosticSeverity.Error,
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 6, 9) },
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 8, 9) },
};

return Verify(source, expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static bool IsMethodRequiringAwait(ExpressionSyntax call, SyntaxNodeAnalysisCont
"NServiceBus.IMessageProcessingContext.Reply",
"NServiceBus.IMessageProcessingContext.ForwardCurrentMessageTo",
"NServiceBus.IMessageProcessingContextExtensions.Reply",
"NServiceBus.ScheduleExtensions.ScheduleEvery",
"NServiceBus.Saga.RequestTimeout",
"NServiceBus.Saga.ReplyToOriginator",
"NServiceBus.Endpoint.Create",
Expand Down

0 comments on commit 4563c1f

Please sign in to comment.