@Test public void testConstructDefaultOsPromptPattern() { String prompt = TerminalProperties.constructDefaultOsPromptPattern("host", "environment", "user"); assertThat(prompt).isEqualTo("user:environment@host:[^\\r\\n]*(\\r|\\n)+#\\s*"); prompt = TerminalProperties.constructDefaultOsPromptPattern("host", null, "user"); assertThat(prompt).isEqualTo("user:\\w*@host:[^\\r\\n]*(\\r|\\n)+#\\s*"); prompt = TerminalProperties.constructDefaultOsPromptPattern("host", "", "user"); assertThat(prompt).isEqualTo("user:\\w*@host:[^\\r\\n]*(\\r|\\n)+#\\s*"); }
public static String constructDefaultOsPromptPattern(final String host, final String environment, final String username) { return new StringBuilder().append(username).append(":") .append(environment != null && !environment.isEmpty() ? environment : "\\w*").append("@").append(host) .append(":").append("[^\\r\\n]*(\\r|\\n)+#\\s*").toString(); }
TerminalProperties { public static String constructDefaultOsPromptPattern(final String host, final String environment, final String username) { return new StringBuilder().append(username).append(":") .append(environment != null && !environment.isEmpty() ? environment : "\\w*").append("@").append(host) .append(":").append("[^\\r\\n]*(\\r|\\n)+#\\s*").toString(); } }
TerminalProperties { public static String constructDefaultOsPromptPattern(final String host, final String environment, final String username) { return new StringBuilder().append(username).append(":") .append(environment != null && !environment.isEmpty() ? environment : "\\w*").append("@").append(host) .append(":").append("[^\\r\\n]*(\\r|\\n)+#\\s*").toString(); } private  TerminalProperties(); private  TerminalProperties(final TerminalPropertiesBuilder builder); }
TerminalProperties { public static String constructDefaultOsPromptPattern(final String host, final String environment, final String username) { return new StringBuilder().append(username).append(":") .append(environment != null && !environment.isEmpty() ? environment : "\\w*").append("@").append(host) .append(":").append("[^\\r\\n]*(\\r|\\n)+#\\s*").toString(); } private  TerminalProperties(); private  TerminalProperties(final TerminalPropertiesBuilder builder); static String constructDefaultOsPromptPattern(final String host, final String environment,
            final String username); static TerminalPropertiesBuilder getNewBuilder(); boolean getSkipEnvset(); String getOsPromptPattern(); String getCclPromptPattern(); String getCclLoginPromptPattern(); String getCclLoginSuccessPromptPattern(); List<String> getCclLoginFailurePromptPatterns(); long getExpectationTimeout(); boolean getSpecifyDebugCcl(); String getLogfileLocation(); @Override boolean equals(final Object obj); @Override int hashCode(); static void setGlobalTerminalProperties(final TerminalProperties terminalProperties); static TerminalProperties getGlobalTerminalProperties(); }
TerminalProperties { public static String constructDefaultOsPromptPattern(final String host, final String environment, final String username) { return new StringBuilder().append(username).append(":") .append(environment != null && !environment.isEmpty() ? environment : "\\w*").append("@").append(host) .append(":").append("[^\\r\\n]*(\\r|\\n)+#\\s*").toString(); } private  TerminalProperties(); private  TerminalProperties(final TerminalPropertiesBuilder builder); static String constructDefaultOsPromptPattern(final String host, final String environment,
            final String username); static TerminalPropertiesBuilder getNewBuilder(); boolean getSkipEnvset(); String getOsPromptPattern(); String getCclPromptPattern(); String getCclLoginPromptPattern(); String getCclLoginSuccessPromptPattern(); List<String> getCclLoginFailurePromptPatterns(); long getExpectationTimeout(); boolean getSpecifyDebugCcl(); String getLogfileLocation(); @Override boolean equals(final Object obj); @Override int hashCode(); static void setGlobalTerminalProperties(final TerminalProperties terminalProperties); static TerminalProperties getGlobalTerminalProperties();  }