Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Oct 12, 2024
1 parent 5098987 commit eb9658f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public sealed class HandleBehavior : global::Immediate.Handlers.Shared.Behavior<
private readonly global::Dummy.SomeKeyedService _service;

public HandleBehavior(
[global::Microsoft.Extensions.DependencyInjection.FromKeyedServicesAttribute("SomeServiceKey"), global::Dummy.TestAttribute(Message = "Test")] global::Dummy.SomeKeyedService service
[global::Microsoft.Extensions.DependencyInjection.FromKeyedServicesAttribute("SomeServiceKey"), global::Dummy.TestAttribute(Message = "Test"), global::Dummy.Test2Attribute] global::Dummy.SomeKeyedService service
)
{
_service = service;
Expand Down
7 changes: 5 additions & 2 deletions tests/Immediate.Handlers.Tests/GeneratorTests/HandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ public sealed class TestAttribute : Attribute
{
public required string Message { get; init; }
}
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class Test2Attribute : Attribute;
public sealed class SomeKeyedService;
[Handler]
Expand All @@ -194,7 +197,7 @@ public record Query;
private static ValueTask<int> HandleAsync(
Query _,
[FromKeyedServices("SomeServiceKey")] [Test(Message = "Test")] SomeKeyedService service,
[FromKeyedServices("SomeServiceKey")] [Test(Message = "Test"), Test2] SomeKeyedService service,
CancellationToken token)
{
return ValueTask.FromResult(0);
Expand Down

0 comments on commit eb9658f

Please sign in to comment.