コード例 #1
0
  @Before
  public void setUp() throws Exception {
    executor = mock(InstructionExecutor.class);
    nameTranslator = mock(NameTranslator.class);

    when(executor.call(anyString(), anyString(), anyVararg())).thenReturn(RESULT);
    when(nameTranslator.translate(anyString())).thenAnswer(returnsFirstArg());
  }
コード例 #2
0
 @Override
 protected InstructionResult executeInternal(InstructionExecutor executor) throws SlimException {
   executor.addPath(this.path);
   return new InstructionResult.Ok(getId());
 }