@Test public void GIVEN_url_without_leading_protocol_WHEN_url_requested_THEN_returns_url_with_http_prepended() { testee = new ClientRawUrl("www.waynedgrant.com/weather/clientraw.txt"); assertEquals("http: }
public String getUrl() { String correctedUrl = url; if (!url.endsWith("/clientraw.txt")) { if (!url.endsWith("/")) { correctedUrl += "/"; } if (!url.endsWith("clientraw.txt")) { correctedUrl += "clientraw.txt"; } } if (!url.contains(": correctedUrl = "http: } return correctedUrl; }
ClientRawUrl { public String getUrl() { String correctedUrl = url; if (!url.endsWith("/clientraw.txt")) { if (!url.endsWith("/")) { correctedUrl += "/"; } if (!url.endsWith("clientraw.txt")) { correctedUrl += "clientraw.txt"; } } if (!url.contains(": correctedUrl = "http: } return correctedUrl; } }
ClientRawUrl { public String getUrl() { String correctedUrl = url; if (!url.endsWith("/clientraw.txt")) { if (!url.endsWith("/")) { correctedUrl += "/"; } if (!url.endsWith("clientraw.txt")) { correctedUrl += "clientraw.txt"; } } if (!url.contains(": correctedUrl = "http: } return correctedUrl; } ClientRawUrl(String url); }
ClientRawUrl { public String getUrl() { String correctedUrl = url; if (!url.endsWith("/clientraw.txt")) { if (!url.endsWith("/")) { correctedUrl += "/"; } if (!url.endsWith("clientraw.txt")) { correctedUrl += "clientraw.txt"; } } if (!url.contains(": correctedUrl = "http: } return correctedUrl; } ClientRawUrl(String url); String getUrl(); @Override String toString(); }
ClientRawUrl { public String getUrl() { String correctedUrl = url; if (!url.endsWith("/clientraw.txt")) { if (!url.endsWith("/")) { correctedUrl += "/"; } if (!url.endsWith("clientraw.txt")) { correctedUrl += "clientraw.txt"; } } if (!url.contains(": correctedUrl = "http: } return correctedUrl; } ClientRawUrl(String url); String getUrl(); @Override String toString();  }