Skip to content

Commit

Permalink
Forgot WithAttributeFiltering on the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillig committed Jan 26, 2021
1 parent 5959987 commit 5c04bf6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,15 @@ public void KeyFilterIsAppliedOnConstructorDependencyManyWithOwned()
Assert.Equal(2, resolved.Loggers.Count());
}

[Fact(Skip = "Issue #1250")]
[Fact]
public void KeyFilterIsAppliedOnMultipleIndividualConcreteDependencies()
{
// Issue #1250 - key filtering doesn't work on components keyed as themselves.
var builder = new ContainerBuilder();
builder.RegisterType<ConsoleLogger>().As<ILogger>();
builder.Register(ctx => new IdentifiableObject { Id = "a" }).Keyed<IdentifiableObject>("First");
builder.Register(ctx => new IdentifiableObject { Id = "b" }).Keyed<IdentifiableObject>("Second");
builder.Register(ctx => new IdentifiableObject { Id = "c" }).Keyed<IdentifiableObject>("Third");
builder.RegisterType<ManagerWithManyIndividualConcrete>();
builder.RegisterType<ManagerWithManyIndividualConcrete>().WithAttributeFiltering();

var container = builder.Build();
var resolved = container.Resolve<ManagerWithManyIndividualConcrete>();
Expand Down

0 comments on commit 5c04bf6

Please sign in to comment.