diff --git a/src/DependencyInjection.Attributed.Tests/GenerationTests.cs b/src/DependencyInjection.Attributed.Tests/GenerationTests.cs index 9273fe6..9ecc4fd 100644 --- a/src/DependencyInjection.Attributed.Tests/GenerationTests.cs +++ b/src/DependencyInjection.Attributed.Tests/GenerationTests.cs @@ -7,8 +7,18 @@ namespace Tests.DependencyInjection; -public record GenerationTests(ITestOutputHelper Output) +public class GenerationTests(ITestOutputHelper Output) { + [Fact] + public void RegisterInternalService() + { + var collection = new ServiceCollection(); + collection.AddServices(); + var services = collection.BuildServiceProvider(); + + var instance = services.GetRequiredService(); + } + [Fact] public void RegisterSingletonService() { @@ -335,4 +345,8 @@ public class KeyedByContractName { } public class DependencyFromKeyedContract([Import("contract")] KeyedByContractName dependency) { public KeyedByContractName Dependency => dependency; -} \ No newline at end of file +} + +public interface IService { } +[Service] +class InternalService : IService { } \ No newline at end of file