@Test public void renderEscapedPhrase() { UptimeToken token = new UptimeToken("d 'days'"); Duration duration = Duration.ofDays(42); assertThat(render(token, duration)).isEqualTo("42 days"); }
@Override public void render(final LogEntry logEntry, final StringBuilder builder) { long nanoseconds = logEntry.getTimestamp().calcDifferenceInNanoseconds(RuntimeProvider.getStartTime()); format(builder, nanoseconds); }
UptimeToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { long nanoseconds = logEntry.getTimestamp().calcDifferenceInNanoseconds(RuntimeProvider.getStartTime()); format(builder, nanoseconds); } }
UptimeToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { long nanoseconds = logEntry.getTimestamp().calcDifferenceInNanoseconds(RuntimeProvider.getStartTime()); format(builder, nanoseconds); } UptimeToken();   UptimeToken(final String pattern); }
UptimeToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { long nanoseconds = logEntry.getTimestamp().calcDifferenceInNanoseconds(RuntimeProvider.getStartTime()); format(builder, nanoseconds); } UptimeToken();   UptimeToken(final String pattern); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void render(final LogEntry logEntry, final StringBuilder builder); @Override void apply(final LogEntry logEntry, final PreparedStatement statement, final int index); }
UptimeToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { long nanoseconds = logEntry.getTimestamp().calcDifferenceInNanoseconds(RuntimeProvider.getStartTime()); format(builder, nanoseconds); } UptimeToken();   UptimeToken(final String pattern); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void render(final LogEntry logEntry, final StringBuilder builder); @Override void apply(final LogEntry logEntry, final PreparedStatement statement, final int index);  }