@Test public void skipLastSlashWithoutExistingSlash(){ String expected = "hey"; String origin = "hey"; String actual = this.cut.skipLastSlash(origin); assertThat(actual,is(expected)); }
String skipLastSlash(String uri) { if (!uri.endsWith("/")) { return uri; } return uri.substring(0, uri.lastIndexOf("/")); }
Browser extends Collapsible { String skipLastSlash(String uri) { if (!uri.endsWith("/")) { return uri; } return uri.substring(0, uri.lastIndexOf("/")); } }
Browser extends Collapsible { String skipLastSlash(String uri) { if (!uri.endsWith("/")) { return uri; } return uri.substring(0, uri.lastIndexOf("/")); } Browser(); }
Browser extends Collapsible { String skipLastSlash(String uri) { if (!uri.endsWith("/")) { return uri; } return uri.substring(0, uri.lastIndexOf("/")); } Browser(); Node view(); StringProperty getURI(); @Override DoubleProperty getMaxHeightProperty(); }
Browser extends Collapsible { String skipLastSlash(String uri) { if (!uri.endsWith("/")) { return uri; } return uri.substring(0, uri.lastIndexOf("/")); } Browser(); Node view(); StringProperty getURI(); @Override DoubleProperty getMaxHeightProperty();  }