File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/DependencyInjection.Attributed.Tests Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 77
88namespace Tests . DependencyInjection ;
99
10- public record GenerationTests ( ITestOutputHelper Output )
10+ public class GenerationTests ( ITestOutputHelper Output )
1111{
12+ [ Fact ]
13+ public void RegisterInternalService ( )
14+ {
15+ var collection = new ServiceCollection ( ) ;
16+ collection . AddServices ( ) ;
17+ var services = collection . BuildServiceProvider ( ) ;
18+
19+ var instance = services . GetRequiredService < IService > ( ) ;
20+ }
21+
1222 [ Fact ]
1323 public void RegisterSingletonService ( )
1424 {
@@ -335,4 +345,8 @@ public class KeyedByContractName { }
335345public class DependencyFromKeyedContract ( [ Import ( "contract" ) ] KeyedByContractName dependency )
336346{
337347 public KeyedByContractName Dependency => dependency ;
338- }
348+ }
349+
350+ public interface IService { }
351+ [ Service ]
352+ class InternalService : IService { }
You can’t perform that action at this time.
0 commit comments