コード例 #1
0
  @Test
  public void verify_readFileSource() throws IOException {
    File file = writer.getSourceFile(COMPONENT_REF);
    FileUtils.writeLines(file, of("1", "2", "3"));

    CloseableIterator<String> res = underTest.readFileSource(COMPONENT_REF).get();
    assertThat(res).containsExactly("1", "2", "3");
    res.close();
  }
コード例 #2
0
 @Test
 public void readFileSource_returns_absent_optional_when_file_does_not_exist() {
   assertThat(underTest.readFileSource(COMPONENT_REF)).isAbsent();
 }