@Test public void trimContent_shouldTrimContentBeforeStartingComment() throws Exception { SpringMvcView view = new SpringMvcView("mapping", "<!-- START -->", "<!-- END -->", null); Assert.assertEquals("expected", view.trimContent("before <!-- START -->expected")); }
String trimContent(String string) { int index = string.indexOf(trimContentStart); if (index > 0) string = string.substring(index + trimContentStart.length()); index = string.indexOf(trimContentEnd); if (index > 0) string = string.substring(0, index); return string; }
SpringMvcView implements PageView, FragmentView { String trimContent(String string) { int index = string.indexOf(trimContentStart); if (index > 0) string = string.substring(index + trimContentStart.length()); index = string.indexOf(trimContentEnd); if (index > 0) string = string.substring(0, index); return string; } }
SpringMvcView implements PageView, FragmentView { String trimContent(String string) { int index = string.indexOf(trimContentStart); if (index > 0) string = string.substring(index + trimContentStart.length()); index = string.indexOf(trimContentEnd); if (index > 0) string = string.substring(0, index); return string; } SpringMvcView(String requestMapping, String trimContentStart, String trimContentEnd,
	    Map<String, String> urlsToShorten); }
SpringMvcView implements PageView, FragmentView { String trimContent(String string) { int index = string.indexOf(trimContentStart); if (index > 0) string = string.substring(index + trimContentStart.length()); index = string.indexOf(trimContentEnd); if (index > 0) string = string.substring(0, index); return string; } SpringMvcView(String requestMapping, String trimContentStart, String trimContentEnd,
	    Map<String, String> urlsToShorten); @Override ProviderAndName getController(); @Override String render(PageContext context); @Override String render(FragmentContext context); }
SpringMvcView implements PageView, FragmentView { String trimContent(String string) { int index = string.indexOf(trimContentStart); if (index > 0) string = string.substring(index + trimContentStart.length()); index = string.indexOf(trimContentEnd); if (index > 0) string = string.substring(0, index); return string; } SpringMvcView(String requestMapping, String trimContentStart, String trimContentEnd,
	    Map<String, String> urlsToShorten); @Override ProviderAndName getController(); @Override String render(PageContext context); @Override String render(FragmentContext context);  }