Skip to content

Commit

Permalink
Add unit test for mayuki#93
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuki committed Mar 14, 2023
1 parent fb1cdee commit 021f63c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/Cocona.Lite.Test/CoconaLiteServiceProviderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public void IsService()
serviceProvider.IsService(typeof(IYetAnotherService)).Should().BeFalse();
}

[Fact]
public void Resolve_LastRegisteredService_When_MultipleServicesRegistered()
{
var services = new CoconaLiteServiceCollection();
services.AddSingleton<string>("foo");
services.AddSingleton<string>("bar");
var serviceProvider = new CoconaLiteServiceProvider(services);
serviceProvider.GetRequiredService<string>().Should().Be("bar");
}

[Fact]
public void NoDependency_Singleton_TService_TImplementation()
{
Expand Down

0 comments on commit 021f63c

Please sign in to comment.