Skip to content

Commit 79c1a6c

Browse files
committed
Add sample tests for single type assertions
1 parent d4367e1 commit 79c1a6c

File tree

1 file changed

+20
-0
lines changed
  • src/FluentAssertions.Ioc.Ninject.SampleTests

1 file changed

+20
-0
lines changed

src/FluentAssertions.Ioc.Ninject.SampleTests/IocTests.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@ public void Providers_can_be_resolved_with_at_least_one_instance()
3434
kernel.Should().Resolve(interfaces).WithAtLeastOneInstance();
3535
}
3636

37+
[Test]
38+
public void SampleService_can_be_resolved_with_a_single_instance()
39+
{
40+
// Arrange
41+
var kernel = GetKernel();
42+
43+
// Assert
44+
kernel.Should().Resolve<ISampleService>().WithSingleInstance();
45+
}
46+
47+
[Test]
48+
public void Provider_can_be_resolved_with_at_least_one_instance()
49+
{
50+
// Arrange
51+
var kernel = GetKernel();
52+
53+
// Assert
54+
kernel.Should().Resolve<ISomeProvider>().WithAtLeastOneInstance();
55+
}
56+
3757
[Test]
3858
public void SampleService_resolves_to_expected_implementation()
3959
{

0 commit comments

Comments
 (0)