@Test public void secure_url_without_configured_hostports() { expect(request.isSecure()).andReturn(false).once(); replay(); BaseURLSource baseURLSource = new BaseURLSourceImpl(request, "localhost", 0, 0); assertEquals(baseURLSource.getBaseURL(true), "https: verify(); }
public String getBaseURL(boolean secure) { return String.format("%s: secure ? "https" : "http", hostname(), portExtension(secure)); }
BaseURLSourceImpl implements BaseURLSource { public String getBaseURL(boolean secure) { return String.format("%s: secure ? "https" : "http", hostname(), portExtension(secure)); } }
BaseURLSourceImpl implements BaseURLSource { public String getBaseURL(boolean secure) { return String.format("%s: secure ? "https" : "http", hostname(), portExtension(secure)); } BaseURLSourceImpl(Request request, @Inject @Symbol(SymbolConstants.HOSTNAME) String hostname,
                             @Symbol(SymbolConstants.HOSTPORT) int hostPort, @Symbol(SymbolConstants.HOSTPORT_SECURE) int secureHostPort); }
BaseURLSourceImpl implements BaseURLSource { public String getBaseURL(boolean secure) { return String.format("%s: secure ? "https" : "http", hostname(), portExtension(secure)); } BaseURLSourceImpl(Request request, @Inject @Symbol(SymbolConstants.HOSTNAME) String hostname,
                             @Symbol(SymbolConstants.HOSTPORT) int hostPort, @Symbol(SymbolConstants.HOSTPORT_SECURE) int secureHostPort); String getBaseURL(boolean secure); }
BaseURLSourceImpl implements BaseURLSource { public String getBaseURL(boolean secure) { return String.format("%s: secure ? "https" : "http", hostname(), portExtension(secure)); } BaseURLSourceImpl(Request request, @Inject @Symbol(SymbolConstants.HOSTNAME) String hostname,
                             @Symbol(SymbolConstants.HOSTPORT) int hostPort, @Symbol(SymbolConstants.HOSTPORT_SECURE) int secureHostPort); String getBaseURL(boolean secure);  }