/** * Clones the given {@link MatchWindowDataWithScreenshot} instance, while * setting the primary to the required value. * @param currentMwdws The instance to clone. * @param updatePrimary The primary value to set. * @return A new instance with the updated primary value. */ private static MatchWindowDataWithScreenshot cloneTimedMWDWSWithPrimary( MatchWindowDataWithScreenshot currentMwdws, boolean updatePrimary) { MatchWindowData currentMwd = currentMwdws.getMatchWindowData(); TimedAppOutput currentAppOutput = (TimedAppOutput) currentMwdws.getMatchWindowData().getAppOutput(); TimedAppOutput updatedAppOutput = new TimedAppOutput( currentAppOutput.getTitle(), currentAppOutput.getScreenshot64(), currentAppOutput.getElapsed(), updatePrimary); MatchWindowData updatedMwd = new MatchWindowData( currentMwd.getUserInputs(), updatedAppOutput, currentMwd.getTag(), currentMwd.getIgnoreMismatch(), currentMwd.getOptions()); return new MatchWindowDataWithScreenshot(updatedMwd, currentMwdws.getScreenshot()); }
matchData.getAppOutput().getScreenshot64());
/** * Creates the match data and calls the server connector matchWindow method. * * @param userInputs The user inputs related to the current appOutput. * @param appOutput The application output to be matched. * @param tag Optional tag to be associated with the match (can * be {@code null}). * @param ignoreMismatch Whether to instruct the server to ignore the * match attempt in case of a mismatch. * @return The match result. */ protected MatchResult performMatch(Trigger[] userInputs, AppOutputWithScreenshot appOutput, String tag, boolean ignoreMismatch) { // Prepare match data. MatchWindowData data = new MatchWindowData(userInputs, appOutput .getAppOutput(), tag, ignoreMismatch, new MatchWindowData.Options(tag, userInputs,ignoreMismatch, false, false, false)); // Perform match. return serverConnector.matchWindow(runningSession, data); }
matchData.getAppOutput().getScreenshot64());
/** * Creates the match data and calls the server connector matchWindow method. * * @param userInputs The user inputs related to the current appOutput. * @param appOutput The application output to be matched. * @param tag Optional tag to be associated with the match (can * be {@code null}). * @param ignoreMismatch Whether to instruct the server to ignore the * match attempt in case of a mismatch. * @return The match result. */ protected MatchResult performMatch(Trigger[] userInputs, AppOutputWithScreenshot appOutput, String tag, boolean ignoreMismatch) { // Prepare match data. MatchWindowData data = new MatchWindowData(userInputs, appOutput .getAppOutput(), tag, ignoreMismatch, new MatchWindowData.Options(tag, userInputs,ignoreMismatch, false, false, false)); // Perform match. return serverConnector.matchWindow(runningSession, data); }
/** * Clones the given {@link MatchWindowDataWithScreenshot} instance, while * setting the primary to the required value. * @param currentMwdws The instance to clone. * @param updatePrimary The primary value to set. * @return A new instance with the updated primary value. */ private static MatchWindowDataWithScreenshot cloneTimedMWDWSWithPrimary( MatchWindowDataWithScreenshot currentMwdws, boolean updatePrimary) { MatchWindowData currentMwd = currentMwdws.getMatchWindowData(); TimedAppOutput currentAppOutput = (TimedAppOutput) currentMwdws.getMatchWindowData().getAppOutput(); TimedAppOutput updatedAppOutput = new TimedAppOutput( currentAppOutput.getTitle(), currentAppOutput.getScreenshot64(), currentAppOutput.getElapsed(), updatePrimary); MatchWindowData updatedMwd = new MatchWindowData( currentMwd.getUserInputs(), updatedAppOutput, currentMwd.getTag(), currentMwd.getIgnoreMismatch(), currentMwd.getOptions()); return new MatchWindowDataWithScreenshot(updatedMwd, currentMwdws.getScreenshot()); }
matchData.getAppOutput().getScreenshot64());
/** * Creates the match data and calls the server connector matchWindow method. * * @param userInputs The user inputs related to the current appOutput. * @param appOutput The application output to be matched. * @param tag Optional tag to be associated with the match (can * be {@code null}). * @param ignoreMismatch Whether to instruct the server to ignore the * match attempt in case of a mismatch. * @return The match result. */ protected MatchResult performMatch(Trigger[] userInputs, AppOutputWithScreenshot appOutput, String tag, boolean ignoreMismatch) { // Prepare match data. MatchWindowData data = new MatchWindowData(userInputs, appOutput .getAppOutput(), tag, ignoreMismatch, new MatchWindowData.Options(tag, userInputs,ignoreMismatch, false, false, false)); // Perform match. return serverConnector.matchWindow(runningSession, data); }
/** * Clones the given {@link MatchWindowDataWithScreenshot} instance, while * setting the primary to the required value. * @param currentMwdws The instance to clone. * @param updatePrimary The primary value to set. * @return A new instance with the updated primary value. */ private static MatchWindowDataWithScreenshot cloneTimedMWDWSWithPrimary( MatchWindowDataWithScreenshot currentMwdws, boolean updatePrimary) { MatchWindowData currentMwd = currentMwdws.getMatchWindowData(); TimedAppOutput currentAppOutput = (TimedAppOutput) currentMwdws.getMatchWindowData().getAppOutput(); TimedAppOutput updatedAppOutput = new TimedAppOutput( currentAppOutput.getTitle(), currentAppOutput.getScreenshot64(), currentAppOutput.getElapsed(), updatePrimary); MatchWindowData updatedMwd = new MatchWindowData( currentMwd.getUserInputs(), updatedAppOutput, currentMwd.getTag(), currentMwd.getIgnoreMismatch(), currentMwd.getOptions()); return new MatchWindowDataWithScreenshot(updatedMwd, currentMwdws.getScreenshot()); }
matchData.getAppOutput().getScreenshot64());
String tag = createTagForDeadline(deadline, elapsedSeconds); Trigger[] noUserInputs = new Trigger[0]; currentWindowData = new MatchWindowData( noUserInputs, timedAppOutput,
currentMwdws = collectedData.get(i); currentMwd = currentMwdws.getMatchWindowData(); currentOptions = currentMwd.getOptions(); long currentElapsed = ((TimedAppOutput) currentMwd.getAppOutput()) .getElapsed(); long nextElapsed = ((TimedAppOutput) collectedData.get(i+1).getMatchWindowData().getAppOutput()) .getElapsed(); if (currentElapsed == nextElapsed) { , i)); if (((TimedAppOutput) currentMwd.getAppOutput()).getIsPrimary()){ logger.verbose("Skipped image is primary.."); logger.verbose("Moving primary to the next image.."); mwdToSend = new MatchWindowData( currentMwd.getUserInputs(), currentMwd.getAppOutput(), currentMwd.getTag(), false, new MatchWindowData.Options( currentMwdws = collectedData.get(lastImageIndex); currentMwd = currentMwdws.getMatchWindowData(); currentOptions = currentMwd.getOptions(); mwdToSend = new MatchWindowData( currentMwd.getUserInputs(), currentMwd.getAppOutput(),
matchData.getAppOutput().getScreenshot64());
String tag = createTagForDeadline(deadline, elapsedSeconds); Trigger[] noUserInputs = new Trigger[0]; currentWindowData = new MatchWindowData( noUserInputs, timedAppOutput,
currentMwdws = collectedData.get(i); currentMwd = currentMwdws.getMatchWindowData(); currentOptions = currentMwd.getOptions(); long currentElapsed = ((TimedAppOutput) currentMwd.getAppOutput()) .getElapsed(); long nextElapsed = ((TimedAppOutput) collectedData.get(i+1).getMatchWindowData().getAppOutput()) .getElapsed(); if (currentElapsed == nextElapsed) { , i)); if (((TimedAppOutput) currentMwd.getAppOutput()).getIsPrimary()){ logger.verbose("Skipped image is primary.."); logger.verbose("Moving primary to the next image.."); mwdToSend = new MatchWindowData( currentMwd.getUserInputs(), currentMwd.getAppOutput(), currentMwd.getTag(), false, new MatchWindowData.Options( currentMwdws = collectedData.get(lastImageIndex); currentMwd = currentMwdws.getMatchWindowData(); currentOptions = currentMwd.getOptions(); mwdToSend = new MatchWindowData( currentMwd.getUserInputs(), currentMwd.getAppOutput(),
theMatchIndex); TimedAppOutput tao = (TimedAppOutput) theMatch.getMatchWindowData().getAppOutput(); long matchElapsed = tao.getElapsed(); long deadlineMs = deadline * 1000; currentMwdws.getMatchWindowData().getAppOutput();
String tag = createTagForDeadline(deadline, elapsedSeconds); Trigger[] noUserInputs = new Trigger[0]; currentWindowData = new MatchWindowData( noUserInputs, timedAppOutput,
currentMwdws = collectedData.get(i); currentMwd = currentMwdws.getMatchWindowData(); currentOptions = currentMwd.getOptions(); long currentElapsed = ((TimedAppOutput) currentMwd.getAppOutput()) .getElapsed(); long nextElapsed = ((TimedAppOutput) collectedData.get(i+1).getMatchWindowData().getAppOutput()) .getElapsed(); if (currentElapsed == nextElapsed) { , i)); if (((TimedAppOutput) currentMwd.getAppOutput()).getIsPrimary()){ logger.verbose("Skipped image is primary.."); logger.verbose("Moving primary to the next image.."); mwdToSend = new MatchWindowData( currentMwd.getUserInputs(), currentMwd.getAppOutput(), currentMwd.getTag(), false, new MatchWindowData.Options( currentMwdws = collectedData.get(lastImageIndex); currentMwd = currentMwdws.getMatchWindowData(); currentOptions = currentMwd.getOptions(); mwdToSend = new MatchWindowData( currentMwd.getUserInputs(), currentMwd.getAppOutput(),
theMatchIndex); TimedAppOutput tao = (TimedAppOutput) theMatch.getMatchWindowData().getAppOutput(); long matchElapsed = tao.getElapsed(); long deadlineMs = deadline * 1000; currentMwdws.getMatchWindowData().getAppOutput();
String tag = appOutput.getTitle(); Trigger[] noUserInputs = new Trigger[0]; MatchWindowData mwd = new MatchWindowData( noUserInputs, timedAppOutput,