Skip to content
Merged
Changes from all commits
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
18 changes: 16 additions & 2 deletions src/DependencyInjection.Attributed.Tests/GenerationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<IService>();
}

[Fact]
public void RegisterSingletonService()
{
Expand Down Expand Up @@ -335,4 +345,8 @@ public class KeyedByContractName { }
public class DependencyFromKeyedContract([Import("contract")] KeyedByContractName dependency)
{
public KeyedByContractName Dependency => dependency;
}
}

public interface IService { }
[Service]
class InternalService : IService { }