Skip to content

Commit

Permalink
PR comments and attempt to fix code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Jun 27, 2023
1 parent c6e88aa commit cd35a19
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Extensions.Http.Resilience.FaultInjection;
/// Provides extension methods for <see cref="Context"/>.
/// </summary>
[Experimental]
public static class PolicyContextExtensions
public static class ContextExtensions
{
private const string CallingRequestMessage = "CallingRequestMessage";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ public static IHttpResilienceStrategyBuilder AddResilienceHandler(
_ = Throw.IfNullOrEmpty(strategyName);
_ = Throw.IfNull(configure);

var resilienceBuilder = builder.AddResilienceHandler(
strategyName,
(builder, _) => configure(builder));
return builder.AddResilienceHandler(strategyName, ConfigureBuilder);

return resilienceBuilder;
void ConfigureBuilder(ResilienceStrategyBuilder<HttpResponseMessage> builder, ResilienceHandlerContext context) => configure(builder);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.Extensions.Http.Resilience.FaultInjection.Test;

public class PolicyContextExtensionsTest
public class ContextExtensionsTest
{
[Fact]
public void WithCallingRequestMessage_ShouldSetRequestMessageInContext()
Expand Down

0 comments on commit cd35a19

Please sign in to comment.