Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r committed Jan 3, 2024
1 parent 4dca293 commit b03592f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SteroidsDI.Tests/Cases/FactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public void Named_Binding_Should_Throw_On_Unknown_Lifetime()
var services = new ServiceCollection();
var context = services.For<IBuilder>();
Should.Throw<InvalidOperationException>(() => context.Named<SpecialBuilder>("xxx")).Message.ShouldBe(@"The DI container does not register type 'SteroidsDI.Tests.IBuilder', so it is not possible to determine the value of Lifetime.
Use the 'Named'/'Default' overloads with explicit Lifetime or first register 'SteroidsDI.Tests.IBuilder' in the DI container.");
Should.Throw<InvalidOperationException>(() => context.Default<SpecialBuilder>()).Message.ShouldBe(@"The DI container does not register type 'SteroidsDI.Tests.IBuilder', so it is not possible to determine the value of Lifetime.
Use the 'Named'/'Default' overloads with explicit Lifetime or first register 'SteroidsDI.Tests.IBuilder' in the DI container.");
}

Expand Down

0 comments on commit b03592f

Please sign in to comment.