@Test public void applyTextOfEqualLengthToMinimumSize() throws SQLException { MinimumSizeToken token = new MinimumSizeToken(new PlainTextToken("Hello!"), 6); PreparedStatement statement = mock(PreparedStatement.class); token.apply(LogEntryBuilder.empty().create(), statement, 1); verify(statement).setString(1, "Hello!"); }
@Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { StringBuilder builder = new StringBuilder(); render(logEntry, builder); statement.setString(index, builder.toString()); }
MinimumSizeToken implements Token { @Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { StringBuilder builder = new StringBuilder(); render(logEntry, builder); statement.setString(index, builder.toString()); } }
MinimumSizeToken implements Token { @Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { StringBuilder builder = new StringBuilder(); render(logEntry, builder); statement.setString(index, builder.toString()); } MinimumSizeToken(final Token token, final int size); }
MinimumSizeToken implements Token { @Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { StringBuilder builder = new StringBuilder(); render(logEntry, builder); statement.setString(index, builder.toString()); } MinimumSizeToken(final Token token, final int size); @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); }
MinimumSizeToken implements Token { @Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { StringBuilder builder = new StringBuilder(); render(logEntry, builder); statement.setString(index, builder.toString()); } MinimumSizeToken(final Token token, final int size); @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);  }