@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@NotNull @Override public Into into(@Nullable final String databaseName, @NotNull final String tableName) { return new IntoImpl(databaseName, tableName, this); } }
@Test public void columns_returnsNotNullValue() { /* Given */ IntoImpl into = new IntoImpl(null, "table", mock(SqlPart.class)); /* When */ InsertColumns result = into.columns("a", "b"); /* Then */ assertThat(result, is(notNullValue())); }
@Test public void values_returnsNotNullValue() { /* Given */ IntoImpl into = new IntoImpl(null, "table", mock(SqlPart.class)); /* When */ Values result = into.values("a", "b"); /* Then */ assertThat(result, is(notNullValue())); } }
@Test public void previous_returnsProperItem() { /* Given */ SqlPart sqlPart = mock(SqlPart.class); IntoImpl into = new IntoImpl(null, "table", sqlPart); /* When */ SqlPart result = into.previous(); /* Then */ assertThat(result, is(sqlPart)); }
@Test public void prependTo_table_prependsProperSql() { /* Given */ IntoImpl into = new IntoImpl(null, "table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); /* When */ into.prependTo(builder); /* Then */ assertThat(builder.toString(), is("INTO table")); }
@Test public void prependTo_databaseTable_prependsProperSql() { /* Given */ IntoImpl into = new IntoImpl("database", "table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); /* When */ into.prependTo(builder); /* Then */ assertThat(builder.toString(), is("INTO database.table")); }