File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/FluentAssertions.Ioc.Ninject.Tests Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments