@Test public void countToken() { String pattern = new File(folder.getRoot(), "{count}.log").getAbsolutePath(); DynamicPath path = new DynamicPath(pattern); assertThat(path.resolve()).isEqualTo(folder.getRoot() + File.separator + "0.log"); }
public String resolve() { Timestamp timestamp = RuntimeProvider.createTimestamp(); StringBuilder builder = new StringBuilder(); for (Segment segment : segments) { builder.append(segment.createToken(builder.toString(), timestamp)); } return builder.toString(); }
DynamicPath { public String resolve() { Timestamp timestamp = RuntimeProvider.createTimestamp(); StringBuilder builder = new StringBuilder(); for (Segment segment : segments) { builder.append(segment.createToken(builder.toString(), timestamp)); } return builder.toString(); } }
DynamicPath { public String resolve() { Timestamp timestamp = RuntimeProvider.createTimestamp(); StringBuilder builder = new StringBuilder(); for (Segment segment : segments) { builder.append(segment.createToken(builder.toString(), timestamp)); } return builder.toString(); } DynamicPath(final String path); }
DynamicPath { public String resolve() { Timestamp timestamp = RuntimeProvider.createTimestamp(); StringBuilder builder = new StringBuilder(); for (Segment segment : segments) { builder.append(segment.createToken(builder.toString(), timestamp)); } return builder.toString(); } DynamicPath(final String path); String resolve(); List<FileTuple> getAllFiles(final String backupSuffix); boolean isValid(final File file); }
DynamicPath { public String resolve() { Timestamp timestamp = RuntimeProvider.createTimestamp(); StringBuilder builder = new StringBuilder(); for (Segment segment : segments) { builder.append(segment.createToken(builder.toString(), timestamp)); } return builder.toString(); } DynamicPath(final String path); String resolve(); List<FileTuple> getAllFiles(final String backupSuffix); boolean isValid(final File file);  }