@Test public void testToStringNoDivision() { AccessVerifyConnectionSpec av = new AccessVerifyConnectionSpec(null, "foo", "bar", "123.45.67.89", "www.example.org"); assertEquals("foo;bar", av.toString()); }
@Override public String toString() { if (StringUtils.hasText(getDivision())) return getDivision() + DIVISION_CREDENTIALS_DELIMITER + getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); else return getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); }
AccessVerifyConnectionSpec implements ConnectionSpec { @Override public String toString() { if (StringUtils.hasText(getDivision())) return getDivision() + DIVISION_CREDENTIALS_DELIMITER + getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); else return getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); } }
AccessVerifyConnectionSpec implements ConnectionSpec { @Override public String toString() { if (StringUtils.hasText(getDivision())) return getDivision() + DIVISION_CREDENTIALS_DELIMITER + getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); else return getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); } AccessVerifyConnectionSpec(String division, final String accessCode, final String verifyCode, String clientAddress, String clientHostName); }
AccessVerifyConnectionSpec implements ConnectionSpec { @Override public String toString() { if (StringUtils.hasText(getDivision())) return getDivision() + DIVISION_CREDENTIALS_DELIMITER + getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); else return getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); } AccessVerifyConnectionSpec(String division, final String accessCode, final String verifyCode, String clientAddress, String clientHostName); String getClientAddress(); String getClientHostName(); String getDivision(); String getAccessCode(); String getVerifyCode(); String getCredentials(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
AccessVerifyConnectionSpec implements ConnectionSpec { @Override public String toString() { if (StringUtils.hasText(getDivision())) return getDivision() + DIVISION_CREDENTIALS_DELIMITER + getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); else return getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); } AccessVerifyConnectionSpec(String division, final String accessCode, final String verifyCode, String clientAddress, String clientHostName); String getClientAddress(); String getClientHostName(); String getDivision(); String getAccessCode(); String getVerifyCode(); String getCredentials(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String DIVISION_CREDENTIALS_DELIMITER; static final String ACCESS_VERIFY_CODE_DELIMITER; }