コード例 #1
0
  @BeforeTest
  private void initializeMocks() {
    parentProcessor = mock(CommandProcessor.class);
    when(parentProcessor.doCommand(eq(VALID_COMMAND), Matchers.<String[]>any())).thenReturn(null);
    when(parentProcessor.doCommand(eq(EXCEPTION_THROWING_COMMAND), Matchers.<String[]>any()))
        .thenThrow(new RuntimeException());
    exceptionThrowingScreenshotter = new ExceptionThrowingScreenshotter();

    processor = new ScreenshotHttpCommandProcessor(parentProcessor, exceptionThrowingScreenshotter);
  }
コード例 #2
0
  private String executeCommand(String methodName, final String[] values) {
    String output = commandProcessor.doCommand(methodName, values);

    if (output != null && LOG.isDebugEnabled()) {
      LOG.debug("Command processor returned '" + output + "'");
    }

    return output;
  }
コード例 #3
0
ファイル: ScreenCapture.java プロジェクト: kiranjot/Xebium
 private String executeCommand(String methodName, final String[] values) {
   return commandProcessor.doCommand(methodName, values);
 }
コード例 #4
0
 private void waitForPageLoadIfNeeded(ExtendedSeleniumCommand command) {
   if (command.isAndWaitCommand()) {
     commandProcessor.doCommand("waitForPageToLoad", new String[] {"" + timeout});
   }
 }