diff --git a/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/DependencyInjection_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/DependencyInjection_Tests.cs index 8e3975708c..0dfe473ee5 100644 --- a/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/DependencyInjection_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/DependencyInjection_Tests.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using Shouldly; using Volo.Abp.DependencyInjection; using Volo.Abp.Modularity; @@ -96,6 +97,10 @@ public abstract class DependencyInjection_Standard_Tests : AbpIntegratedTest().ShouldNotBeNull(); GetRequiredKeyedService("k3").ShouldNotBeNull(); GetRequiredKeyedService("k3").ShouldNotBeNull(); + + //resolving multiple keyed services + GetKeyedServices>("k1").ShouldNotBeEmpty(); + GetKeyedServices>("k1").Count().ShouldBeGreaterThanOrEqualTo(2); } [Fact] @@ -222,6 +227,12 @@ public abstract class DependencyInjection_Standard_Tests : AbpIntegratedTest("k1")] + public class MyExposingKeyedService4 : IMyExposingKeyedServices, ITransientDependency + { + } public class TestModule : AbpModule