Skip to content

Commit 11401ec

Browse files
committed
Add missing tests
1 parent a1227ef commit 11401ec

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/FluentAssertions.Ioc.Ninject.Tests/KernelAssertionTests.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,32 @@ public void Should_fail_when_asserting_an_interface_can_be_resolved_with_a_singl
6767
act.ShouldThrow<AssertionException>();
6868
}
6969

70+
[Test]
71+
public void Should_succeed_when_asserting_interface_can_be_resolved_with_at_least_instance()
72+
{
73+
// Arrange
74+
var kernel = GetKernel();
75+
76+
// Act
77+
Action act = () => kernel.Should().Resolve<ISomeProvider>().WithAtLeastOneInstance();
78+
79+
// Assert
80+
act.ShouldNotThrow<AssertionException>();
81+
}
82+
83+
[Test]
84+
public void Should_fail_when_asserting_interface_can_be_resolved_with_at_least_instance()
85+
{
86+
// Arrange
87+
var kernel = GetKernel();
88+
89+
// Act
90+
Action act = () => kernel.Should().Resolve<ISomeFactory>().WithAtLeastOneInstance();
91+
92+
// Assert
93+
act.ShouldThrow<AssertionException>();
94+
}
95+
7096
[Test]
7197
public void Should_succeed_when_asserting_interfaces_can_be_resolved_with_at_least_instance()
7298
{

0 commit comments

Comments
 (0)