Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor test changes
  • Loading branch information
benjaminpetit authored and github-actions committed Dec 11, 2023
commit 86dfc61433d5e3b0897a496b88200640e5fd6f5c
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@ public void ResolveKeyedServicesAnyKey()

var provider = CreateServiceProvider(serviceCollection);


// Return all services registered with a non null key
var allServices = provider.GetKeyedServices<IService>(KeyedService.AnyKey).ToList();
Assert.Equal(4, allServices.Count);
Assert.Equal(new[] { service1, service2, service3, service4 }, allServices);

// Check again (caching)
var allServices2 = provider.GetKeyedServices<IService>(KeyedService.AnyKey).ToList();
Assert.Equal(allServices, allServices2);
}

[Fact]
Expand Down