IndentationProvider { public String getIndentation() { if (config.useSoftTabs) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < config.softTabSize; i++) { sb.append(StringValue.Space); } return sb.toString(); } return StringValue.Tab; } IndentationProvider(Configuration config); String getIndentation();  }
@Test public void getIndentation_A$_hardTabs() throws Exception { Configuration config = new Configuration(); IndentationProvider target = new IndentationProvider(config); String actual = target.getIndentation(); String expected = "\t"; assertThat(actual, is(equalTo(expected))); }
@Test public void getIndentation_A$_softTabs() throws Exception { Configuration config = new Configuration(); config.useSoftTabs = true; IndentationProvider target = new IndentationProvider(config); String actual = target.getIndentation(); String expected = " "; assertThat(actual, is(equalTo(expected))); }
@Test public void getIndentation_A$_softTabs2() throws Exception { Configuration config = new Configuration(); config.useSoftTabs = true; config.softTabSize = 2; IndentationProvider target = new IndentationProvider(config); String actual = target.getIndentation(); String expected = " "; assertThat(actual, is(equalTo(expected))); }