Skip to content

Commit

Permalink
new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed May 30, 2023
1 parent ad6bbf7 commit 6845288
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Polly.Core.Tests/GenericResilienceStrategyBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public void Ctor_EnsureDefaults()
_builder.Builder.IsGenericBuilder.Should().BeTrue();
}

[Fact]
public void CopyCtor_Ok()
{
new ResilienceStrategyBuilder<string>(new ResilienceStrategyBuilder()).Builder.IsGenericBuilder.Should().BeTrue();
}

[Fact]
public void Properties_GetSet_Ok()
{
Expand Down
4 changes: 3 additions & 1 deletion src/Polly.Core.Tests/ResilienceStrategyBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,14 @@ public void BuildStrategy_EnsureCorrectContext()
var builder = new ResilienceStrategyBuilder
{
BuilderName = "builder-name",
TimeProvider = new FakeTimeProvider().Object
TimeProvider = new FakeTimeProvider().Object,
IsGenericBuilder = true
};

builder.AddStrategy(
context =>
{
context.IsGenericBuilder.Should().BeTrue();
context.BuilderName.Should().Be("builder-name");
context.StrategyName.Should().Be("strategy-name");
context.StrategyType.Should().Be("Test");
Expand Down

0 comments on commit 6845288

Please sign in to comment.