@Test public void isCorrectOutputForDisplay() throws Exception { String requiredDisplay = ":99"; String stdoutString = "name of display: :99\nversion number: 11.0\nvendor string: The X.Org Foundation\nvendor release number: 11804000\nX.Org version: 1.18.4\nmaximum request size: 16777212 bytes\nmotion buffer size: 256\nbitmap unit, bit order, padding: 32, LSBFir..."; assertEquals("isCorrect...", true, DefaultDisplayReadinessChecker.isCorrectOutputForDisplay(stdoutString, requiredDisplay)); }
protected static boolean isCorrectOutputForDisplay(String stdout, String requiredDisplay) { Pattern pattern = Pattern.compile("^name of display:\\s+" + Pattern.quote(requiredDisplay) + "$", Pattern.MULTILINE); return pattern.matcher(stdout).find(); }
DefaultDisplayReadinessChecker implements XvfbManager.DisplayReadinessChecker { protected static boolean isCorrectOutputForDisplay(String stdout, String requiredDisplay) { Pattern pattern = Pattern.compile("^name of display:\\s+" + Pattern.quote(requiredDisplay) + "$", Pattern.MULTILINE); return pattern.matcher(stdout).find(); } }
DefaultDisplayReadinessChecker implements XvfbManager.DisplayReadinessChecker { protected static boolean isCorrectOutputForDisplay(String stdout, String requiredDisplay) { Pattern pattern = Pattern.compile("^name of display:\\s+" + Pattern.quote(requiredDisplay) + "$", Pattern.MULTILINE); return pattern.matcher(stdout).find(); } DefaultDisplayReadinessChecker(ProcessTracker processTracker); }
DefaultDisplayReadinessChecker implements XvfbManager.DisplayReadinessChecker { protected static boolean isCorrectOutputForDisplay(String stdout, String requiredDisplay) { Pattern pattern = Pattern.compile("^name of display:\\s+" + Pattern.quote(requiredDisplay) + "$", Pattern.MULTILINE); return pattern.matcher(stdout).find(); } DefaultDisplayReadinessChecker(ProcessTracker processTracker); static Iterable<String> getRequiredPrograms(); @Override boolean checkReadiness(String display); }
DefaultDisplayReadinessChecker implements XvfbManager.DisplayReadinessChecker { protected static boolean isCorrectOutputForDisplay(String stdout, String requiredDisplay) { Pattern pattern = Pattern.compile("^name of display:\\s+" + Pattern.quote(requiredDisplay) + "$", Pattern.MULTILINE); return pattern.matcher(stdout).find(); } DefaultDisplayReadinessChecker(ProcessTracker processTracker); static Iterable<String> getRequiredPrograms(); @Override boolean checkReadiness(String display);  }