コード例 #1
0
 @Test
 public void runDoesNotRotateWhenItIsImpossible() {
   tl.getCommands()[1].runCommand();
   tl.getCommands()[1].runCommand();
   tl.getCommands()[1].runCommand();
   tl.getCommands()[1].runCommand();
   tl.getCommands()[1].runCommand();
   lr.runCommand();
   assertEquals(1, p.getAsento());
   for (int i = 0; i < 10; i++) {
     tl.getCommands()[2].runCommand();
   }
   lr.runCommand();
   assertEquals(1, p.getAsento());
 }
コード例 #2
0
 @Test
 public void runWorksNormally() {
   lr.runCommand();
   assertEquals(2, p.getAsento());
 }