@Test public void throwsExceptionWhenAppendingToNonExistingFile() throws Exception { assertThatThrownBy(() -> this.fileStorage.append("!evelyn-db")) .hasMessageContaining(storageFile.toString()); }
@Override public void append(String data) { try { Files.write(location, Collections.singleton(data), StandardOpenOption.APPEND); } catch (IOException e) { throw new UncheckedIOException(e); } }
FileStorage extends StorageSupport { @Override public void append(String data) { try { Files.write(location, Collections.singleton(data), StandardOpenOption.APPEND); } catch (IOException e) { throw new UncheckedIOException(e); } } }
FileStorage extends StorageSupport { @Override public void append(String data) { try { Files.write(location, Collections.singleton(data), StandardOpenOption.APPEND); } catch (IOException e) { throw new UncheckedIOException(e); } } FileStorage(Path location); }
FileStorage extends StorageSupport { @Override public void append(String data) { try { Files.write(location, Collections.singleton(data), StandardOpenOption.APPEND); } catch (IOException e) { throw new UncheckedIOException(e); } } FileStorage(Path location); @Override String getReference(); @Override void append(String data); @Override Stream<String> read(Charset charset); }
FileStorage extends StorageSupport { @Override public void append(String data) { try { Files.write(location, Collections.singleton(data), StandardOpenOption.APPEND); } catch (IOException e) { throw new UncheckedIOException(e); } } FileStorage(Path location); @Override String getReference(); @Override void append(String data); @Override Stream<String> read(Charset charset);  }