File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Ninject.Web.AspNetCore.Test/Unit Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,13 @@ public void OptionalKeyedServiceCollectionExisting_CorrectServiceResolved()
2929 provider . GetKeyedService ( typeof ( IWarrior ) , "Samurai" ) . Should ( ) . NotBeNull ( ) . And . BeOfType ( typeof ( Samurai ) ) ;
3030 provider . GetKeyedService ( typeof ( IWarrior ) , "Ninja1" ) . Should ( ) . NotBeNull ( ) . And . BeOfType ( typeof ( Ninja ) ) .
3131 And . Match ( x => ( ( Ninja ) x ) . Name == "test" ) ;
32- provider . GetKeyedService ( typeof ( IWarrior ) , "Ninja2" ) . Should ( ) . NotBeNull ( ) . And . BeOfType ( typeof ( Ninja ) ) .
32+ var ninja2First = provider . GetKeyedService ( typeof ( IWarrior ) , "Ninja2" ) ;
33+ var ninja2Second = provider . GetKeyedService ( typeof ( IWarrior ) , "Ninja2" ) ;
34+ ninja2First . Should ( ) . NotBeNull ( ) . And . BeOfType ( typeof ( Ninja ) ) .
3335 And . Match ( x => ( ( Ninja ) x ) . Name == "test:Ninja2" ) ;
36+ ninja2Second . Should ( ) . NotBeNull ( ) . And . BeOfType ( typeof ( Ninja ) ) .
37+ And . Match ( x => ( ( Ninja ) x ) . Name == "test:Ninja2" ) ;
38+ ninja2First . Should ( ) . NotBeSameAs ( ninja2Second ) ;
3439 }
3540
3641 [ Fact ]
You can’t perform that action at this time.
0 commit comments