File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
src/InEngine.Core.Test/Commands Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 1- using BeekmanLabs . UnitTesting ;
1+ using System . Collections . Generic ;
2+ using BeekmanLabs . UnitTesting ;
23using InEngine . Commands ;
34using InEngine . Core . Commands ;
45using InEngine . Core . Exceptions ;
@@ -51,5 +52,27 @@ public void ShouldRunChainOfCommandsAndFail()
5152 mockCommand1 . Verify ( x => x . Run ( ) , Times . Once ( ) ) ;
5253 mockCommand2 . Verify ( x => x . Run ( ) , Times . Never ( ) ) ;
5354 }
55+
56+ [ Test ]
57+ public void ShouldRunChainOfDifferentCommands ( )
58+ {
59+ Subject . Commands = new List < AbstractCommand > ( ) {
60+ new AlwaysSucceed ( ) ,
61+ new Echo ( ) { VerbatimText = "Hello, world!" } ,
62+ } ;
63+
64+ Subject . Run ( ) ;
65+ }
66+
67+ [ Test ]
68+ public void ShouldRunChainOfDifferentCommandsAsAbstractCommand ( )
69+ {
70+ Subject . Commands = new [ ] {
71+ new AlwaysSucceed ( ) as AbstractCommand ,
72+ new Echo ( ) { VerbatimText = "Hello, world!" } as AbstractCommand ,
73+ } ;
74+
75+ Subject . Run ( ) ;
76+ }
5477 }
5578}
You can’t perform that action at this time.
0 commit comments