GlobMatcherFileReader implements LineProcessor<List<GlobMatcher>> { @Override public List<GlobMatcher> getResult() { return globMatchers; }  @Override boolean processLine(String line); @Override List<GlobMatcher> getResult();  }
@Test public void blankLineTest() throws IOException { processLines(" "); assertThat("Result should be empty", reader.getResult().isEmpty(), equalTo(true)); }
@Test public void emptyLineTest() throws IOException { processLines(StringUtils.EMPTY); assertThat("Result should be empty", reader.getResult().isEmpty(), equalTo(true)); }
@Test public void commentLineTest() throws IOException { processLines("# this is a comment"); assertThat("Result should be empty", reader.getResult().isEmpty(), equalTo(true)); }
@Test public void commentLineTrailingSpacesTest() throws IOException { processLines(" # this is a comment"); assertThat("Result should be empty", reader.getResult().isEmpty(), equalTo(true)); }
@Test public void oneLineTest() throws IOException { processLines("*"); assertThat("Result should contain one matcher", reader.getResult().size(), equalTo(1)); }
@Test public void twoLinesTest() throws IOException { processLines("*", "*.java"); assertThat("Result should contain two matchers", reader.getResult().size(), equalTo(2)); }
@Test public void manyLinesWithCommentsAndBlankLinesTest() throws IOException { processLines("# This is a comment", "*.java", "*.cpp", StringUtils.EMPTY, "*.class"); assertThat("Result should contain three matchers", reader.getResult().size(), equalTo(3)); }