@Test public void testNoneSplit() { replay(elementMock); expect(renderFontMock.getWidth("abc")).andReturn(40); expect(renderFontMock.getWidth(" def")).andReturn(40); replay(renderFontMock); TextBreak textBreak = new TextBreak("abc def", 100, renderFontMock); List<String> lines = textBreak.split(); assertEquals(1, lines.size()); assertEquals("abc def", lines.get(0)); }
@Nonnull public List<String> split() { if (isSingleLine()) { return singleResult(); } return processWords(); }
TextBreak { @Nonnull public List<String> split() { if (isSingleLine()) { return singleResult(); } return processWords(); } }
TextBreak { @Nonnull public List<String> split() { if (isSingleLine()) { return singleResult(); } return processWords(); } TextBreak(@Nonnull final String line, final int width, final RenderFont font); }
TextBreak { @Nonnull public List<String> split() { if (isSingleLine()) { return singleResult(); } return processWords(); } TextBreak(@Nonnull final String line, final int width, final RenderFont font); @Nonnull List<String> split(); }
TextBreak { @Nonnull public List<String> split() { if (isSingleLine()) { return singleResult(); } return processWords(); } TextBreak(@Nonnull final String line, final int width, final RenderFont font); @Nonnull List<String> split();  }