Skip to content

Commit

Permalink
made agreed changes to ForwardCancellationTokenAnalyzer plus some oth…
Browse files Browse the repository at this point in the history
…er tweaks
  • Loading branch information
adamralph committed May 5, 2021
1 parent c840e62 commit 3f52132
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class TestMessage : ICommand {}
}

[Test]
public Task MethodAcceptingTokenIsOnASuperClass()
public Task MethodAcceptingTokenIsOnADerivedClass()
{
var source =
@"using NServiceBus;
Expand Down Expand Up @@ -267,9 +267,10 @@ static DiagnosticResult NotForwardedAt(int line, int character)
}

[Test]
public Task NoDiagnosticWhenNoBaseType()
public Task NoBaseType()
{
return NoDiagnostic(@"
var source =
@"
using NServiceBus;
using System;
using System.Threading;
Expand All @@ -296,7 +297,17 @@ public async Task Invoke(IMadeUpContext context, Func<IMadeUpContext, Task> next
}
public class TestMessage : ICommand {}
public interface IMadeUpContext {}
");
";

var expecteds = new[]
{
NotForwardedAt(10, 15),
NotForwardedAt(11, 15),
NotForwardedAt(12, 15),
NotForwardedAt(13, 15),
};

return Verify(source, expecteds);
}

[Test]
Expand Down

0 comments on commit 3f52132

Please sign in to comment.