Skip to content

Commit 4399235

Browse files
committed
Remove restriction on not resolving generic interfaces. I can't remember why it's there. Closes #1.
1 parent 6adeeff commit 4399235

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/FluentAssertions.Ioc.Ninject/KernelAssertions.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ public void WithSingleInstance()
6060
{
6161
try
6262
{
63-
if (type.IsGenericTypeDefinition)
64-
// TODO: We need to deal with generic interfaces.
65-
continue;
66-
else
67-
Subject.Get(type);
63+
Subject.Get(type);
64+
6865
}
6966
catch (ActivationException ex)
7067
{
@@ -89,16 +86,11 @@ public void WithAtLeastOneInstance()
8986
{
9087
try
9188
{
92-
if (type.IsGenericTypeDefinition)
93-
// TODO: We need to deal with generic interfaces.
94-
continue;
95-
else
89+
var instances = Subject.GetAll(type);
90+
if (!instances.Any())
9691
{
97-
var instances = Subject.GetAll(type);
98-
if (!instances.Any())
99-
failed.Add(new ActivationError() { Type = type });
92+
failed.Add(new ActivationError() { Type = type });
10093
}
101-
10294
}
10395
catch (ActivationException ex)
10496
{

0 commit comments

Comments
 (0)