diff --git a/pom.xml b/pom.xml
index 1f2e907e..c71bbce9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -206,14 +206,5 @@
-
- * Example with a {@link Source} and a {@link Table} with test on the content on the first row of the {@code movie} + * Example with a {@link ConnectionProvider} and a {@link Table} with test on the content on the first row of the {@code movie} * table that the {@code title} column contains "Alien" like text and the next column contains 1979 like number : *
* *
*
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- * Table table = new Table(source, "movie");
+ * ConnectionProvider connectionProvider = ConnectionProviderFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Table table = new Table(connectionProvider, "movie");
* assertThat(table)
* .row()
* .value("title")
@@ -71,8 +71,8 @@
*
*
*
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- * Table table = new Table(source, "movie");
+ * ConnectionProvider connectionProvider = ConnectionProviderFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Table table = new Table(connectionProvider, "movie");
* assertThat(table)
* .row()
* .value("title")
diff --git a/src/main/java/org/assertj/db/api/BDDAssertions.java b/src/main/java/org/assertj/db/api/BDDAssertions.java
index 7cb7e902..175f605e 100644
--- a/src/main/java/org/assertj/db/api/BDDAssertions.java
+++ b/src/main/java/org/assertj/db/api/BDDAssertions.java
@@ -19,8 +19,8 @@
import org.assertj.db.exception.AssertJDBException;
import org.assertj.db.type.Changes;
+import org.assertj.db.type.ConnectionProvider;
import org.assertj.db.type.Request;
-import org.assertj.db.type.Source;
import org.assertj.db.type.Table;
/**
@@ -33,14 +33,14 @@
* The assertion methods are defined in assertions package.
*
*
- * Example with a {@link Source} and a {@link Table} with test on the content on the first row of the {@code movie}
+ * Example with a {@link ConnectionProvider} and a {@link Table} with test on the content on the first row of the {@code movie}
* table that the {@code title} column contains "Alien" as text and the next column contains 1979 as a number :
*
*
*
*
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- * Table table = new Table(source, "movie");
+ * ConnectionProvider connectionProvider = ConnectionProviderFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Table table = new Table(connectionProvider, "movie");
* then(table)
* .row()
* .value("title")
@@ -71,8 +71,8 @@
*
*
*
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- * Table table = new Table(source, "movie");
+ * ConnectionProvider connectionProvider = ConnectionProviderFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Table table = new Table(connectionProvider, "movie");
* then(table)
* .row()
* .value("title")
diff --git a/src/main/java/org/assertj/db/api/ErrorCollector.java b/src/main/java/org/assertj/db/api/ErrorCollector.java
index 7bc4f7f4..449c91fc 100644
--- a/src/main/java/org/assertj/db/api/ErrorCollector.java
+++ b/src/main/java/org/assertj/db/api/ErrorCollector.java
@@ -34,18 +34,16 @@ public class ErrorCollector {
private static final String INTERCEPT_METHOD_NAME = "intercept";
private static final String CLASS_NAME = ErrorCollector.class.getName();
-
+ // scope : the current soft-assertion object
+ private final List errors = new ArrayList<>();
+ // scope : the last assertion call (might be nested)
+ private final LastResult lastResult = new LastResult();
/**
* Construct empty error collector.
*/
public ErrorCollector() {
}
- // scope : the current soft-assertion object
- private final List errors = new ArrayList<>();
- // scope : the last assertion call (might be nested)
- private final LastResult lastResult = new LastResult();
-
private static int countErrorCollectorProxyCalls() {
int nbCalls = 0;
for (StackTraceElement stackTraceElement : Thread.currentThread().getStackTrace()) {
diff --git a/src/main/java/org/assertj/db/api/TableAssert.java b/src/main/java/org/assertj/db/api/TableAssert.java
index b9f6bb8e..89251021 100644
--- a/src/main/java/org/assertj/db/api/TableAssert.java
+++ b/src/main/java/org/assertj/db/api/TableAssert.java
@@ -48,7 +48,7 @@ public TableAssert(Table table) {
*/
@Override
public TableAssert exists() {
- return AssertionsOnTableExistence.exists(this, info, actual.getName(), actual.getSource(), actual.getDataSource());
+ return AssertionsOnTableExistence.exists(this, info, actual.getName(), actual.getConnectionProvider());
}
/**
@@ -65,6 +65,6 @@ public TableAssert exists() {
*/
@Override
public TableAssert doesNotExist() {
- return AssertionsOnTableExistence.doesNotExists(this, info, actual.getName(), actual.getSource(), actual.getDataSource());
+ return AssertionsOnTableExistence.doesNotExists(this, info, actual.getName(), actual.getConnectionProvider());
}
}
diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java
index 770cf4c6..78d41951 100644
--- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java
+++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java
@@ -17,16 +17,14 @@
import java.sql.Connection;
import java.sql.DatabaseMetaData;
-import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
-import javax.sql.DataSource;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.core.internal.Failures;
import org.assertj.db.api.AbstractDbAssert;
import org.assertj.db.exception.AssertJDBException;
-import org.assertj.db.type.Source;
+import org.assertj.db.type.ConnectionProvider;
/**
* Implements the assertion method on the existence of a table.
@@ -47,18 +45,20 @@ private AssertionsOnTableExistence() {
/**
* Verifies that the table exists.
*
- * @param The type of the assertion which call this method.
- * @param assertion The assertion which call this method.
- * @param info Writable information about an assertion.
- * @param table The table name to search in DB.
- * @param source The source to connect to DB.
- * @param dataSource The source to connect to DB.
+ * @param The type of the assertion which call this method.
+ * @param assertion The assertion which call this method.
+ * @param info Writable information about an assertion.
+ * @param table The table name to search in DB.
+ * @param connectionProvider The provider to connect to DB.
* @return {@code this} assertion object.
* @throws AssertionError If the table does not exist.
*/
public static > A exists(A assertion, WritableAssertionInfo info,
- String table, Source source, DataSource dataSource) {
- try (Connection connection = getConnection(source, dataSource)) {
+ String table, ConnectionProvider connectionProvider) {
+ if (connectionProvider == null) {
+ throw new NullPointerException("connectionProvider must be not null");
+ }
+ try (Connection connection = connectionProvider.getConnection()) {
DatabaseMetaData metaData = connection.getMetaData();
ResultSet result = metaData.getTables(null, null, table, null);
if (!result.next()) {
@@ -75,18 +75,20 @@ private AssertionsOnTableExistence() {
/**
* Verifies that the database not contains the table.
*
- * @param The type of the assertion which call this method.
- * @param assertion The assertion which call this method.
- * @param info Writable information about an assertion.
- * @param table The table name to search in DB.
- * @param source The source to connect to DB.
- * @param dataSource The source to connect to DB.
+ * @param The type of the assertion which call this method.
+ * @param assertion The assertion which call this method.
+ * @param info Writable information about an assertion.
+ * @param table The table name to search in DB.
+ * @param connectionProvider The provider to connect to DB.
* @return {@code this} assertion object.
* @throws AssertionError If the table does not exist.
*/
public static > A doesNotExists(A assertion, WritableAssertionInfo info,
- String table, Source source, DataSource dataSource) {
- try (Connection connection = getConnection(source, dataSource)) {
+ String table, ConnectionProvider connectionProvider) {
+ if (connectionProvider == null) {
+ throw new NullPointerException("connectionProvider must be not null");
+ }
+ try (Connection connection = connectionProvider.getConnection()) {
DatabaseMetaData metaData = connection.getMetaData();
ResultSet result = metaData.getTables(null, null, table, null);
if (result.next()) {
@@ -98,14 +100,4 @@ private AssertionsOnTableExistence() {
}
return assertion;
}
-
- private static Connection getConnection(Source source, DataSource dataSource) throws SQLException {
- if (source == null && dataSource == null) {
- throw new NullPointerException("connection or dataSource must be not null");
- }
- if (dataSource != null) {
- return dataSource.getConnection();
- }
- return DriverManager.getConnection(source.getUrl(), source.getUser(), source.getPassword());
- }
}
diff --git a/src/main/java/org/assertj/db/type/SourceWithLetterCase.java b/src/main/java/org/assertj/db/type/AbstractConnectionProvider.java
similarity index 53%
rename from src/main/java/org/assertj/db/type/SourceWithLetterCase.java
rename to src/main/java/org/assertj/db/type/AbstractConnectionProvider.java
index 573a089a..caf322a9 100644
--- a/src/main/java/org/assertj/db/type/SourceWithLetterCase.java
+++ b/src/main/java/org/assertj/db/type/AbstractConnectionProvider.java
@@ -12,70 +12,56 @@
*/
package org.assertj.db.type;
+import java.lang.reflect.InvocationTargetException;
+
import org.assertj.db.type.lettercase.LetterCase;
-import org.assertj.db.type.lettercase.WithLetterCase;
/**
- * A source to indicates the information to connect to the database with letter case.
+ * Base implementation for ConnectionProvider that handle letter case and schema metadata management.
*
- * @author Régis Pouiller
- * @since 1.1.0
+ * @author Julien Roy
+ * @since 3.0.0
*/
-public class SourceWithLetterCase extends Source implements WithLetterCase {
+abstract class AbstractConnectionProvider implements ConnectionProvider {
+
+ private final SchemaMetadata schemaMetadata;
- /**
- * Letter case of the tables.
- */
private final LetterCase tableLetterCase;
- /**
- * Letter case of the columns.
- */
private final LetterCase columnLetterCase;
- /**
- * Letter case of the primary keys.
- */
private final LetterCase primaryKeyLetterCase;
- /**
- * Constructor with the information.
- *
- * @param url URL to the database.
- * @param user User to connect.
- * @param password Password to connect.
- * @param tableLetterCase Letter case of the tables.
- * @param columnLetterCase Letter case of the columns.
- * @param primaryKeyLetterCase Letter case of the primary keys.
- */
- public SourceWithLetterCase(String url, String user, String password,
- LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
-
- super(url, user, password);
+ protected AbstractConnectionProvider(Class extends SchemaMetadata> schemaMetadataType, LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
+ this.schemaMetadata = instantiateSchemaMetadata(schemaMetadataType);
this.tableLetterCase = tableLetterCase;
this.columnLetterCase = columnLetterCase;
this.primaryKeyLetterCase = primaryKeyLetterCase;
}
- /**
- * {@inheritDoc}
- */
+ private SchemaMetadata instantiateSchemaMetadata(Class extends SchemaMetadata> schemaMetadataType) {
+ try {
+ return schemaMetadataType.getConstructor(ConnectionProvider.class).newInstance(this);
+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
+ throw new IllegalArgumentException("Schema metadata instantiation failure", e);
+ }
+ }
+
+ @Override
+ public LetterCase getTableLetterCase() {
+ return tableLetterCase;
+ }
+
@Override
public LetterCase getColumnLetterCase() {
return columnLetterCase;
}
- /**
- * {@inheritDoc}
- */
@Override
public LetterCase getPrimaryKeyLetterCase() {
return primaryKeyLetterCase;
}
- /**
- * {@inheritDoc}
- */
@Override
- public LetterCase getTableLetterCase() {
- return tableLetterCase;
+ public SchemaMetadata getMetaData() {
+ return this.schemaMetadata;
}
}
diff --git a/src/main/java/org/assertj/db/type/AbstractDbData.java b/src/main/java/org/assertj/db/type/AbstractDbData.java
index b52a8657..27240ffb 100644
--- a/src/main/java/org/assertj/db/type/AbstractDbData.java
+++ b/src/main/java/org/assertj/db/type/AbstractDbData.java
@@ -12,16 +12,19 @@
*/
package org.assertj.db.type;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.List;
+
import org.assertj.db.exception.AssertJDBException;
import org.assertj.db.type.lettercase.LetterCase;
import org.assertj.db.util.NameComparator;
import org.assertj.db.util.RowComparator;
-import javax.sql.DataSource;
-import java.sql.*;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* This class represents data from the database (either a {@link Table} or a {@link Request}).
*
@@ -35,6 +38,7 @@
* @param Class of the subclass (an implementation of {@link AbstractDbData}) : useful for the fluent methods
* (setters).
* @author Régis Pouiller
+ * @author Julien Roy
*/
public abstract class AbstractDbData> extends AbstractDbElement {
@@ -60,39 +64,26 @@ public abstract class AbstractDbData> extends Abstra
private List columnsList;
/**
- * Default constructor.
- *
- * @param dataType The type of the data on which is the change.
- * @param selfType Class of this element : a sub-class of {@code AbstractDbData}.
- */
- AbstractDbData(Class selfType, DataType dataType) {
- super(selfType);
- this.dataType = dataType;
- }
-
- /**
- * Constructor with a {@link Source}.
+ * Constructor with a {@link JdbcUrlConnectionProvider}.
*
- * @param dataType The type of the data on which is the change.
- * @param selfType Class of this element : a sub-class of {@code AbstractDbData}.
- * @param source The {@link Source} to connect to the database (must be not {@code null}).
- * @throws NullPointerException If {@code source} is {@code null}.
+ * @param dataType The type of the data on which is the change.
+ * @param selfType Class of this element : a subclass of {@code AbstractDbData}.
+ * @param connectionProvider The {@link JdbcUrlConnectionProvider} to connect to the database (must be not {@code null}).
+ * @throws NullPointerException If {@code connectionProvider} is {@code null}.
*/
- AbstractDbData(Class selfType, DataType dataType, Source source) {
- super(selfType, source);
+ protected AbstractDbData(Class selfType, DataType dataType, ConnectionProvider connectionProvider) {
+ super(selfType, connectionProvider);
this.dataType = dataType;
}
/**
- * Constructor with a {@link DataSource}.
+ * Only used for tests.
*
- * @param dataType The type of the data on which is the change.
- * @param selfType Class of this element : a sub-class of {@code AbstractDbData}.
- * @param dataSource The {@link DataSource} (must be not {@code null}).
- * @throws NullPointerException If {@code dataSource} is {@code null}.
+ * @param selfType Class of DbElement.
+ * @param dataType Type of DbData.
*/
- AbstractDbData(Class selfType, DataType dataType, DataSource dataSource) {
- super(selfType, dataSource);
+ protected AbstractDbData(Class selfType, DataType dataType) {
+ super(selfType);
this.dataType = dataType;
}
@@ -121,12 +112,12 @@ public DataType getDataType() {
* depending of being a {@link Table} or a {@link Request}.
*
*
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
private void load() {
try (Connection connection = getConnection()) {
- // Call the specific loading depending of Table or Request.
+ // Call the specific loading depending on Table or Request.
loadImpl(connection);
if (pksNameList == null) {
pksNameList = new ArrayList<>();
@@ -219,7 +210,7 @@ protected void collectRowsFromResultSet(ResultSet resultSet) throws SQLException
*
*
* @return The list of the columns name.
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
public List getColumnsNameList() {
@@ -246,7 +237,7 @@ protected void setColumnsNameList(List columnsNameList) {
*
*
* @return The list of the primary key name.
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@link #getConnectionProvider()} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
public List getPksNameList() {
@@ -296,7 +287,7 @@ protected void controlIfAllThePksNameExistInTheColumns() {
*
*
* @return The list of the values.
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
public List getRowsList() {
@@ -316,7 +307,7 @@ public List getRowsList() {
*
*
* @return The list of the values in columns.
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
public List getColumnsList() {
@@ -345,7 +336,7 @@ public List getColumnsList() {
*
* @param index The column index.
* @return The column and the values
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
public Column getColumn(int index) {
@@ -362,7 +353,7 @@ public Column getColumn(int index) {
*
* @param index The index
* @return The {@link Row}
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
public Row getRow(int index) {
@@ -379,7 +370,7 @@ public Row getRow(int index) {
*
* @param index The column index
* @return The values
- * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}.
+ * @throws NullPointerException If the {@code connectionProvider} fields are {@code null}.
* @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading.
*/
private List getValuesList(int index) {
diff --git a/src/main/java/org/assertj/db/type/AbstractDbElement.java b/src/main/java/org/assertj/db/type/AbstractDbElement.java
index dc4e46ad..c1b498d1 100644
--- a/src/main/java/org/assertj/db/type/AbstractDbElement.java
+++ b/src/main/java/org/assertj/db/type/AbstractDbElement.java
@@ -12,22 +12,20 @@
*/
package org.assertj.db.type;
-import org.assertj.db.type.lettercase.LetterCase;
-import org.assertj.db.type.lettercase.WithLetterCase;
-
-import javax.sql.DataSource;
import java.sql.Connection;
-import java.sql.DriverManager;
import java.sql.SQLException;
+import org.assertj.db.type.lettercase.LetterCase;
+import org.assertj.db.type.lettercase.WithLetterCase;
+
/**
* This class represents element from the database (either a {@link AbstractDbData} or a {@link Change}).
- * So this class contains : the way to access the database with {@link #getSource()} and {@link #getDataSource()} (one
- * of them need to be set before loading the data).
+ * So this class contains : the way to access the database with {@link #getConnectionProvider()}.
*
* @param Class of the subclass (an implementation of {@link AbstractDbElement}) : useful for the fluent methods
* (setters).
* @author Régis Pouiller
+ * @author Julien Roy
*/
public abstract class AbstractDbElement> implements DbElement, WithLetterCase {
@@ -36,136 +34,33 @@ public abstract class AbstractDbElement> implemen
*/
protected final D myself;
/**
- * Source of the data.
- */
- private Source source;
- /**
- * Data source.
- */
- private DataSource dataSource;
- /**
- * Letter case of the tables.
- *
- * @since 1.1.0
- */
- private LetterCase tableLetterCase;
- /**
- * Letter case of the columns.
- *
- * @since 1.1.0
- */
- private LetterCase columnLetterCase;
- /**
- * Letter case of the primary keys.
- *
- * @since 1.1.0
- */
- private LetterCase primaryKeyLetterCase;
-
- /**
- * Default constructor.
- *
- * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}.
+ * Database connection provider.
*/
- AbstractDbElement(Class selfType) {
- myself = selfType.cast(this);
- setLetterCases();
- }
+ private final ConnectionProvider connectionProvider;
/**
* Constructor.
*
- * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}.
- * @param source The {@link Source} to connect to the database (must be not {@code null}).
- * @throws NullPointerException If {@code source} is {@code null}.
- */
- AbstractDbElement(Class selfType, Source source) {
- this(selfType);
- this.source = source;
- setLetterCases();
- }
-
- /**
- * Constructor.
- *
- * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}.
- * @param dataSource The {@link DataSource} (must be not {@code null}).
- * @throws NullPointerException If {@code dataSource} is {@code null}.
- */
- AbstractDbElement(Class selfType, DataSource dataSource) {
- this(selfType);
- this.dataSource = dataSource;
- setLetterCases();
- }
-
- /**
- * Returns the catalog from a connection.
- *
- * @param connection The connection with the catalog
- * @return The catalog from a connection.
- * @throws SQLException SQL Exception
- */
- protected static String getCatalog(Connection connection) throws SQLException {
- try {
- return connection.getCatalog();
- } catch (SQLException exception) {
- throw exception;
- } catch (Exception throwable) {
- return null;
+ * @param selfType Class of this element : a subclass of {@code AbstractDbElement}.
+ * @param connectionProvider The {@link ConnectionProvider} to connect to the database (must be not {@code null}).
+ * @throws NullPointerException If {@code connectionProvider} is {@code null}.
+ */
+ protected AbstractDbElement(Class selfType, ConnectionProvider connectionProvider) {
+ this.myself = selfType.cast(this);
+ if (connectionProvider == null) {
+ throw new IllegalArgumentException("connectionProvider can not be null");
}
+ this.connectionProvider = connectionProvider;
}
/**
- * Returns the schema from a connection.
+ * Only used for tests.
*
- * @param connection The connection with the catalog
- * @return The schema from a connection.
- * @throws SQLException SQL Exception
+ * @param selfType Class of DbElement.
*/
- protected static String getSchema(Connection connection) throws SQLException {
- try {
- return connection.getSchema();
- } catch (SQLException exception) {
- throw exception;
- } catch (Exception throwable) {
- return null;
- }
- }
-
- /**
- * Sets the letter cases from information in parameters.
- *
- * @param tableLetterCase Letter case of the tables.
- * @param columnLetterCase Letter case of the columns.
- * @param primaryKeyLetterCase Letter case of the primary keys.
- * @return The actual instance.
- */
- D setLetterCases(LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
- this.tableLetterCase = tableLetterCase;
- this.columnLetterCase = columnLetterCase;
- this.primaryKeyLetterCase = primaryKeyLetterCase;
- return myself;
- }
-
- /**
- * Sets the letter cases from information in {@code dataSource} and {@code source}.
- */
- private void setLetterCases() {
- if (dataSource instanceof WithLetterCase) {
- WithLetterCase withLetterCase = (WithLetterCase) dataSource;
- tableLetterCase = withLetterCase.getTableLetterCase();
- columnLetterCase = withLetterCase.getColumnLetterCase();
- primaryKeyLetterCase = withLetterCase.getPrimaryKeyLetterCase();
- } else if (source instanceof WithLetterCase) {
- WithLetterCase withLetterCase = (WithLetterCase) source;
- tableLetterCase = withLetterCase.getTableLetterCase();
- columnLetterCase = withLetterCase.getColumnLetterCase();
- primaryKeyLetterCase = withLetterCase.getPrimaryKeyLetterCase();
- } else {
- tableLetterCase = LetterCase.TABLE_DEFAULT;
- columnLetterCase = LetterCase.COLUMN_DEFAULT;
- primaryKeyLetterCase = LetterCase.PRIMARY_KEY_DEFAULT;
- }
+ protected AbstractDbElement(Class selfType) {
+ this.myself = selfType.cast(this);
+ this.connectionProvider = null;
}
/**
@@ -173,7 +68,7 @@ private void setLetterCases() {
*/
@Override
public LetterCase getColumnLetterCase() {
- return columnLetterCase;
+ return this.connectionProvider.getColumnLetterCase();
}
/**
@@ -181,7 +76,7 @@ public LetterCase getColumnLetterCase() {
*/
@Override
public LetterCase getPrimaryKeyLetterCase() {
- return primaryKeyLetterCase;
+ return this.connectionProvider.getPrimaryKeyLetterCase();
}
/**
@@ -189,81 +84,42 @@ public LetterCase getPrimaryKeyLetterCase() {
*/
@Override
public LetterCase getTableLetterCase() {
- return tableLetterCase;
+ return this.connectionProvider.getTableLetterCase();
}
/**
- * Return the source.
+ * Return the connectionProvider.
*
- * @return The {@link Source} to connect.
- * @see #setSource(Source)
+ * @return The {@link ConnectionProvider} to connect.
*/
- public Source getSource() {
- return source;
+ public ConnectionProvider getConnectionProvider() {
+ return connectionProvider;
}
/**
- * Sets the source.
+ * Returns a {@link Connection} from the {@link ConnectionProvider}
*
- * @param source {@link Source} to connect to the database (must be not {@code null}).
- * @return The actual instance.
- * @throws NullPointerException If {@code source} is {@code null}.
- * @see #getSource()
+ * @return A {@link Connection} from connectionProvider
+ * @throws SQLException SQL Exception
+ * @throws NullPointerException this connection provider is null
*/
- public D setSource(Source source) {
- if (source == null) {
- throw new NullPointerException("source must be not null");
- }
- this.source = source;
- this.dataSource = null;
- setLetterCases();
- return myself;
- }
-
- /**
- * Return the data source.
- *
- * @return The data source.
- * @see #setDataSource(DataSource)
- */
- public DataSource getDataSource() {
- return dataSource;
- }
-
- /**
- * Sets the data source.
- *
- * @param dataSource The {@link DataSource} (must be not {@code null}).
- * @return The actual instance.
- * @throws NullPointerException If {@code dataSource} is {@code null}.
- * @see #getDataSource()
- */
- public D setDataSource(DataSource dataSource) {
- if (dataSource == null) {
- throw new NullPointerException("dataSource must be not null");
+ protected Connection getConnection() throws SQLException {
+ if (connectionProvider == null) {
+ throw new NullPointerException("connectionProvider must be not null");
}
- this.source = null;
- this.dataSource = dataSource;
- setLetterCases();
- return myself;
+ return connectionProvider.getConnection();
}
/**
- * Returns a {@link Connection} from a {@link DataSource} or from a {@link Source}.
+ * Returns a {@link SchemaMetadata} from the {@link ConnectionProvider}
*
- * @return A {@link Connection} differently, depending if it is a {@link DataSource} or a {@link Source}.
- * @throws SQLException SQL Exception
+ * @return A {@link SchemaMetadata} from connectionProvider
+ * @throws NullPointerException this connection provider is null
*/
- protected Connection getConnection() throws SQLException {
- if (dataSource == null && source == null) {
- throw new NullPointerException("connection or dataSource must be not null");
- }
-
- // Get a Connection differently, depending if it is a DataSource or a Source.
- if (dataSource != null) {
- return dataSource.getConnection();
- } else {
- return DriverManager.getConnection(source.getUrl(), source.getUser(), source.getPassword());
+ protected SchemaMetadata getMetaData() {
+ if (connectionProvider == null) {
+ throw new NullPointerException("connectionProvider must be not null");
}
+ return connectionProvider.getMetaData();
}
}
diff --git a/src/main/java/org/assertj/db/type/AssertDbConnection.java b/src/main/java/org/assertj/db/type/AssertDbConnection.java
new file mode 100644
index 00000000..9eba7349
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/AssertDbConnection.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+/**
+ * Entry point for creating database element ( Table, Request, Changes ) required to build assertion.
+ * Use {@link AssertDbConnectionFactory} to construct new instance of this builder.
+ *
+ * Provider fluent builder for create Table, Request and Changes :
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Table table = connection.table("movie").build();
+ * Request request = connection.request("select * from actor;").build();
+ * Changes changes = connection.changes().build();
+ *
+ *
+ *
+ * Some more advanced examples :
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Table table = connection.table("movie").columnToCheck(new String[] { "number", "title" }).build();
+ * Request request = connection.request("select * from actor where id = ?;").parameters(1).build();
+ * Changes changes = connection.changes().table("movie", t -> t.columnToCheck(new String[] { "number", "title" })).build();
+ *
+ *
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public class AssertDbConnection {
+
+ private final ConnectionProvider connectionProvider;
+
+ AssertDbConnection(ConnectionProvider connectionProvider) {
+ if (connectionProvider == null) {
+ throw new IllegalArgumentException("connectionProvider can not be null");
+ }
+ this.connectionProvider = connectionProvider;
+ }
+
+ /**
+ * Start building Table element.
+ *
+ * @param name Name of the table
+ * @return Table builder
+ */
+ public Table.Builder table(String name) {
+ return new Table.Builder(this.connectionProvider, name);
+ }
+
+ /**
+ * Start building Request element.
+ *
+ * @param request SQL request
+ * @return Request builder
+ */
+ public Request.Builder request(String request) {
+ return new Request.Builder(this.connectionProvider, request);
+ }
+
+ /**
+ * Start building Changes element.
+ *
+ * @return Changes builder
+ */
+ public Changes.Builder changes() {
+ return new Changes.Builder(this.connectionProvider);
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/AssertDbConnectionFactory.java b/src/main/java/org/assertj/db/type/AssertDbConnectionFactory.java
new file mode 100644
index 00000000..3aa65b51
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/AssertDbConnectionFactory.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import javax.sql.DataSource;
+
+import org.assertj.db.type.lettercase.LetterCase;
+
+/**
+ * Factory to create a {@link AssertDbConnection} from different database connection input ( Jdbc URL or DataSource ).
+ * Allow to configure behavior of connection provider like letter case or schema metadata retrieval mode.
+ *
+ * For create with JDBC URL :
+ *
+ *
+ *
+ * AssertDbConnection connection = AssertDbConnectionFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Table table = connection.table("movie").build();
+ *
+ *
+ * For create with JDBC URL :
+ *
+ *
+ * DataSource dataSource = ...;
+ * AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
+ * Table table = connection.table("song").columnToCheck(new String[] { "number", "title" }).build();
+ *
+ *
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public abstract class AssertDbConnectionFactory {
+
+ private AssertDbConnectionFactory() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Initiate factory with Java.sql.DataSource
+ *
+ * @param dataSource Datasource to retrieve data from database.
+ * @return Factory of ConnectionProvider
+ */
+ public static DataSourceConnectionProviderFactory of(DataSource dataSource) {
+ return new DataSourceConnectionProviderFactory(dataSource);
+ }
+
+ /**
+ * Initiate factory with JDBC connection information
+ *
+ * @param url JDBC url of database.
+ * @param user Connection username.
+ * @param password Connection password.
+ * @return Factory of ConnectionProvider
+ */
+ public static JdbcUrlConnectionProviderFactory of(String url, String user, String password) {
+ return new JdbcUrlConnectionProviderFactory(url, user, password);
+ }
+
+ /**
+ * DataSource variant of ConnectionProviderFactory
+ */
+ public static class DataSourceConnectionProviderFactory extends AbstractConnectionProviderFactory {
+ private final DataSource dataSource;
+
+ private DataSourceConnectionProviderFactory(DataSource dataSource) {
+ super();
+ this.dataSource = dataSource;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ConnectionProvider createConnectionProvider() {
+ return new DataSourceConnectionProvider(dataSource, this.schemaMetaDataMode.getType(), this.tableLetterCase, this.columnLetterCase, this.primaryKeyLetterCase);
+ }
+ }
+
+ /**
+ * Jdbc url variant of ConnectionProviderFactory
+ */
+ public static class JdbcUrlConnectionProviderFactory extends AbstractConnectionProviderFactory {
+ private final String url;
+ private final String user;
+ private final String password;
+
+ private JdbcUrlConnectionProviderFactory(String url, String user, String password) {
+ super();
+
+ this.url = url;
+ this.user = user;
+ this.password = password;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ConnectionProvider createConnectionProvider() {
+ return new JdbcUrlConnectionProvider(url, user, password, this.schemaMetaDataMode.getType(), this.tableLetterCase, this.columnLetterCase, this.primaryKeyLetterCase);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private abstract static class AbstractConnectionProviderFactory {
+
+ /**
+ * Schema metadata retrieval mode.
+ */
+ protected SchemaMetaDataMode schemaMetaDataMode = SchemaMetaDataMode.DYNAMIC;
+ /**
+ * Tables letter case.
+ */
+ protected LetterCase tableLetterCase = LetterCase.TABLE_DEFAULT;
+ /**
+ * Columns letter case.
+ */
+ protected LetterCase columnLetterCase = LetterCase.COLUMN_DEFAULT;
+ /**
+ * PKs letter case.
+ */
+ protected LetterCase primaryKeyLetterCase = LetterCase.PRIMARY_KEY_DEFAULT;
+
+ private AbstractConnectionProviderFactory() {
+ }
+
+ /**
+ * Modify the default letter case mode for connection provider.
+ *
+ * @param tableLetterCase Tables letter case.
+ * @param columnLetterCase Columns letter case.
+ * @param primaryKeyLetterCase PKs letter case.
+ * @return the current instance of factory.
+ */
+ public T letterCase(LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
+ this.tableLetterCase = tableLetterCase;
+ this.columnLetterCase = columnLetterCase;
+ this.primaryKeyLetterCase = primaryKeyLetterCase;
+ return (T) this;
+ }
+
+ /**
+ * Modify the current mode for schema metadata retrieval.
+ *
+ * @param mode The selected mode
+ * @return the current instance of factory.
+ */
+ public T schemaMetaDataMode(SchemaMetaDataMode mode) {
+ if (mode == null) {
+ throw new IllegalArgumentException("SchemaMetaDataMode cannot be null");
+ }
+ this.schemaMetaDataMode = mode;
+ return (T) this;
+ }
+
+ /**
+ * Build the Connection Provider
+ *
+ * @return Connection provider to use for Table, Request or Changes
+ */
+ protected abstract ConnectionProvider createConnectionProvider();
+
+ /**
+ * Build the Connection Provider
+ *
+ * @return Connection provider to use for Table, Request or Changes
+ */
+ public AssertDbConnection create() {
+ return new AssertDbConnection(createConnectionProvider());
+ }
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/CachedSchemaMetaData.java b/src/main/java/org/assertj/db/type/CachedSchemaMetaData.java
new file mode 100644
index 00000000..6b594733
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/CachedSchemaMetaData.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Implementation of SchemaMetadata that cache the metadata of the first request without any expiration.
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+class CachedSchemaMetaData implements SchemaMetadata {
+
+ private final FromConnectionSchemaMetadata metadata;
+ private final Map> cache = new ConcurrentHashMap<>();
+
+ public CachedSchemaMetaData(ConnectionProvider connectionProvider) {
+ this.metadata = new FromConnectionSchemaMetadata(connectionProvider);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection getTablesName() {
+ return cache.computeIfAbsent("TABLES", key -> this.metadata.getTablesName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection getColumnsName(String tableName) {
+ return cache.computeIfAbsent("COLUMNS#" + tableName, key -> this.metadata.getColumnsName(tableName));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection getPrimaryKeys(String tableName) {
+ return cache.computeIfAbsent("PKS#" + tableName, key -> this.metadata.getPrimaryKeys(tableName));
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/Changes.java b/src/main/java/org/assertj/db/type/Changes.java
index 3af50b2c..acd07ee9 100644
--- a/src/main/java/org/assertj/db/type/Changes.java
+++ b/src/main/java/org/assertj/db/type/Changes.java
@@ -16,23 +16,74 @@
import static org.assertj.db.type.Change.createDeletionChange;
import static org.assertj.db.type.Change.createModificationChange;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.SQLException;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import javax.sql.DataSource;
+import java.util.function.Consumer;
import org.assertj.db.exception.AssertJDBException;
import org.assertj.db.util.ChangeComparator;
/**
* Changes in the database.
+ *
+ * A Changes should be constructed by the fluent builder {@link Changes.Builder} from a AssertDbConnection instance.
+ *
+ *
+ * Examples of instantiation :
+ *
+ *
+ * -
+ *
+ * This {@link Changes} detect all changes in database.
+ *
*
+ *
+ *
+ * AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
+ * Changes changes = connection.changes().build();
+ * changes.setStartPointNow();
+ * ....
+ * do some DB updates
+ * ....
+ * changes.setEndPointNow();
+ * assertThat(changes).....
+ *
+ *
+ *
+ *
+ * -
+ *
+ * This {@link Changes} detect changes for only two table.
+ *
+ *
+ *
+ *
+ * AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
+ * Changes changes = connection.changes().table("movie").table("song").build();
+ *
+ *
+ *
+ *
+ * -
+ *
+ * This {@link Changes} detect changes for row returned by a SQL query.
+ *
+ *
+ *
+ *
+ * AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
+ * Changes changes = connection.changes().request("select * from movie;").build();
+ *
+ *
+ *
+ *
+ *
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class Changes extends AbstractDbElement {
@@ -65,31 +116,15 @@ public class Changes extends AbstractDbElement {
*/
private List changesList;
- /**
- * Constructor.
- */
- public Changes() {
- super(Changes.class);
- }
-
- /**
- * Constructor.
- *
- * @param source The {@link Source} to connect to the database (must be not {@code null}).
- * @throws NullPointerException If {@code source} is {@code null}.
- */
- public Changes(Source source) {
- super(Changes.class, source);
- }
-
/**
* Constructor.
*
- * @param dataSource The {@link DataSource} (must be not {@code null}).
- * @throws NullPointerException If {@code dataSource} is {@code null}.
+ * @param connectionProvider The {@link ConnectionProvider} to connect to the database (must be not {@code null}).
+ * @throws NullPointerException If {@code connectionProvider} is {@code null}.
+ * @since 3.0.0
*/
- public Changes(DataSource dataSource) {
- super(Changes.class, dataSource);
+ private Changes(ConnectionProvider connectionProvider) {
+ super(Changes.class, connectionProvider);
}
/**
@@ -97,8 +132,8 @@ public Changes(DataSource dataSource) {
*
* @param tables Table on which are the comparison.
*/
- public Changes(Table... tables) {
- super(Changes.class);
+ private Changes(ConnectionProvider connectionProvider, Collection tables) {
+ super(Changes.class, connectionProvider);
setTables(tables);
}
@@ -107,24 +142,16 @@ public Changes(Table... tables) {
*
* @param request Request on which are the comparison.
*/
- public Changes(Request request) {
- super(Changes.class);
+ private Changes(ConnectionProvider connectionProvider, Request request) {
+ super(Changes.class, connectionProvider);
setRequest(request);
}
/**
- * Copy a {@link AbstractDbElement} in parameter on another.
- *
- * @param elementToCopy The {@link AbstractDbElement} to copy
- * @param element The {@link AbstractDbElement} on which is the copy
+ * Only used for tests.
*/
- private static void copyElement(AbstractDbElement> elementToCopy, AbstractDbElement> element) {
- if (elementToCopy.getSource() != null) {
- element.setSource(elementToCopy.getSource());
- }
- if (elementToCopy.getDataSource() != null) {
- element.setDataSource(elementToCopy.getDataSource());
- }
+ private Changes() {
+ super(Changes.class);
}
/**
@@ -133,15 +160,11 @@ private static void copyElement(AbstractDbElement> elementToCopy, AbstractDbEl
* @param request The {@link Request} to duplicate
* @return The Duplication
*/
- private static Request getDuplicatedRequest(Request request) {
- Request r = new Request();
- copyElement(request, r);
- return r.setLetterCases(request.getTableLetterCase(),
- request.getColumnLetterCase(),
- request.getPrimaryKeyLetterCase())
- .setRequest(request.getRequest())
- .setParameters(request.getParameters())
- .setPksName(request.getPksNameList().toArray(new String[0]));
+ private Request getDuplicatedRequest(Request request) {
+ return new Request.Builder(this.getConnectionProvider(), request.getRequest())
+ .parameters(request.getParameters())
+ .pksName(request.getPksNameList().toArray(new String[0]))
+ .build();
}
/**
@@ -150,27 +173,21 @@ private static Request getDuplicatedRequest(Request request) {
* @param table The {@link Table} to duplicate
* @return The Duplication
*/
- private static Table getDuplicatedTable(Table table) {
- Table t = new Table();
- copyElement(table, t);
- return t.setLetterCases(table.getTableLetterCase(),
- table.getColumnLetterCase(),
- table.getPrimaryKeyLetterCase())
- .setName(table.getName())
- .setStartDelimiter(table.getStartDelimiter())
- .setEndDelimiter(table.getEndDelimiter())
- .setColumnsToCheck(table.getColumnsToCheck())
- .setColumnsToExclude(table.getColumnsToExclude())
- .setColumnsToOrder(table.getColumnsToOrder());
+ private Table getDuplicatedTable(Table table) {
+ return new Table.Builder(this.getConnectionProvider(), table.getName())
+ .delimiters(table.getStartDelimiter(), table.getEndDelimiter())
+ .columnsToCheck(table.getColumnsToCheck())
+ .columnsToExclude(table.getColumnsToExclude())
+ .columnsToOrder(table.getColumnsToOrder())
+ .build();
}
/**
* Sets the table on which are the comparison.
*
* @param tables Table on which are the comparison.
- * @return {@code this} actual instance.
*/
- public Changes setTables(Table... tables) {
+ private void setTables(Collection tables) {
request = null;
requestAtStartPoint = null;
requestAtEndPoint = null;
@@ -185,10 +202,6 @@ public Changes setTables(Table... tables) {
Table t = getDuplicatedTable(table);
tablesList.add(t);
}
- if (tables.length > 0) {
- copyElement(tables[0], this);
- }
- return myself;
}
/**
@@ -213,9 +226,8 @@ public Request getRequest() {
* Sets the {@link Request}.
*
* @param request The {@link Request}.
- * @return {@code this} actual instance.
*/
- public Changes setRequest(Request request) {
+ private void setRequest(Request request) {
if (request == null) {
throw new NullPointerException("The request must be not null");
}
@@ -223,11 +235,9 @@ public Changes setRequest(Request request) {
tablesAtStartPointList = null;
tablesAtEndPointList = null;
this.request = getDuplicatedRequest(request);
- copyElement(request, this);
requestAtStartPoint = null;
requestAtEndPoint = null;
changesList = null;
- return myself;
}
/**
@@ -277,20 +287,9 @@ public Request getRequestAtEndPoint() {
*/
public Changes setStartPointNow() {
if (request == null && tablesList == null) {
- try (Connection connection = getConnection()) {
- tablesList = new LinkedList<>();
- DatabaseMetaData metaData = connection.getMetaData();
- ResultSet resultSet = metaData.getTables(getCatalog(connection), getSchema(connection), null,
- new String[]{"TABLE"});
- while (resultSet.next()) {
- String tableName = resultSet.getString("TABLE_NAME");
- Table t = new Table().setLetterCases(getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase())
- .setName(getTableLetterCase().convert(tableName));
- copyElement(this, t);
- tablesList.add(t);
- }
- } catch (SQLException e) {
- throw new AssertJDBException(e);
+ tablesList = new LinkedList<>();
+ for (String tableName : getMetaData().getTablesName()) {
+ tablesList.add(new Table.Builder(this.getConnectionProvider(), getTableLetterCase().convert(tableName)).build());
}
}
@@ -538,7 +537,7 @@ public Changes getChangesOfType(ChangeType changeType) {
* @return The new instance.
*/
private Changes createChangesFromThis() {
- Changes changes = new Changes();
+ Changes changes = new Changes(this.getConnectionProvider());
if (request != null) {
changes.request = getDuplicatedRequest(request);
}
@@ -551,4 +550,133 @@ private Changes createChangesFromThis() {
changes.changesList = new ArrayList<>();
return changes;
}
+
+ /**
+ * Fluent {@link Changes} builder.
+ * Use {@link AssertDbConnection} to construct new instance of this builder.
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Changes changes = connection.changes().build();
+ * Changes changes = connection.changes().table("movie", t -> t.columnToCheck(new String[] { "number", "title" })).build();
+ *
+ *
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+ public static class Builder {
+ private final ConnectionProvider connectionProvider;
+ private Request request;
+ private List tables = new ArrayList<>();
+
+ Builder(ConnectionProvider connectionProvider) {
+ this.connectionProvider = connectionProvider;
+ }
+
+ /**
+ * Force usage of {@link Request} for this {@link Changes} instead load all database objects.
+ *
+ * @param request Request to use to retrieve changes from DB.
+ * @return Current builder instance.
+ */
+ public Changes.Builder request(Request request) {
+ this.request = request;
+ return this;
+ }
+
+ /**
+ * Force usage of SQL request for this {@link Changes} instead load all database objects.
+ *
+ * @param request SQL Request to use to retrieve changes from DB.
+ * @return Current builder instance.
+ */
+ public Changes.Builder request(String request) {
+ this.request = new Request.Builder(this.connectionProvider, request).build();
+ return this;
+ }
+
+ /**
+ * Force usage of SQL request for this {@link Changes} instead load all database objects.
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Changes changes = connection.changes()
+ * .request("select * from actor where id = ?", r -> r.parameters(1))
+ * .build();
+ *
+ *
+ *
+ * @param request SQL Request to use to retrieve changes from DB.
+ * @param customizer Method that allow to customize the {@link Request} instance created.
+ * @return Current builder instance.
+ */
+ public Changes.Builder request(String request, Consumer customizer) {
+ Request.Builder builder = new Request.Builder(this.connectionProvider, request);
+ customizer.accept(builder);
+ this.request = builder.build();
+ return this;
+ }
+
+ /**
+ * Add new table to table list to use for this {@link Changes} instead load all database objects.
+ * Each call to this method add new table to list.
+ *
+ * @param name Table name to use to retrieve changes from DB.
+ * @return Current builder instance.
+ */
+ public Changes.Builder table(String name) {
+ this.tables.add(new Table.Builder(this.connectionProvider, name).build());
+ return this;
+ }
+
+ /**
+ * Add new table to table list to use for this {@link Changes} instead load all database objects.
+ * Each call to this method add new table to list.
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Changes changes = connection.changes()
+ * .table("actor", t -> t.setColumnsToOrder(new Order[]{Order.asc("where")})
+ * .build();
+ *
+ *
+ *
+ * @param name Table name to use to retrieve changes from DB.
+ * @param customizer Method that allow to customize the {@link Table} instance created.
+ * @return Current builder instance.
+ */
+ public Changes.Builder table(String name, Consumer customizer) {
+ Table.Builder builder = new Table.Builder(this.connectionProvider, name);
+ customizer.accept(builder);
+ this.tables.add(builder.build());
+ return this;
+ }
+
+ /**
+ * Force usage of {@link Table} list for this {@link Changes} instead load all database objects.
+ *
+ * @param tables Tables to use to retrieve changes from DB.
+ * @return Current builder instance.
+ */
+ public Changes.Builder tables(Table... tables) {
+ this.tables = Arrays.asList(tables);
+ return this;
+ }
+
+ /**
+ * Build the Changes instance.
+ *
+ * @return Changes instance to use in assertThat.
+ */
+ public Changes build() {
+ if (this.tables != null && !tables.isEmpty()) {
+ return new Changes(this.connectionProvider, tables);
+ }
+ if (this.request != null) {
+ return new Changes(this.connectionProvider, request);
+ }
+ return new Changes(this.connectionProvider);
+ }
+ }
}
diff --git a/src/main/java/org/assertj/db/type/ConnectionProvider.java b/src/main/java/org/assertj/db/type/ConnectionProvider.java
new file mode 100644
index 00000000..de61548a
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/ConnectionProvider.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import org.assertj.db.type.lettercase.WithLetterCase;
+
+/**
+ * Represent access to a database with capacity to return schema metadata and settings for letter case management.
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public interface ConnectionProvider extends WithLetterCase {
+
+ /**
+ * Return SQL connection to database.
+ *
+ * @return An active {@link Connection} to database.
+ * @throws SQLException When access to database fail.
+ */
+ Connection getConnection() throws SQLException;
+
+ /**
+ * Return a accessor to retrieve database schema metadata.
+ *
+ * @return An {@link SchemaMetadata} to access to database schema metadata.
+ */
+ SchemaMetadata getMetaData();
+
+}
diff --git a/src/main/java/org/assertj/db/type/DataSourceConnectionProvider.java b/src/main/java/org/assertj/db/type/DataSourceConnectionProvider.java
new file mode 100644
index 00000000..c254848b
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/DataSourceConnectionProvider.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import javax.sql.DataSource;
+
+import org.assertj.db.type.lettercase.LetterCase;
+
+/**
+ * The implementation of {@link ConnectionProvider} based on java.sql.DataSource.
+ * Use {@link AssertDbConnectionFactory} for instantiate.
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public class DataSourceConnectionProvider extends AbstractConnectionProvider {
+
+ private final DataSource dataSource;
+
+ DataSourceConnectionProvider(DataSource dataSource,
+ Class extends SchemaMetadata> schemaMetadataType,
+ LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
+
+ super(schemaMetadataType, tableLetterCase, columnLetterCase, primaryKeyLetterCase);
+ this.dataSource = dataSource;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Connection getConnection() throws SQLException {
+ return dataSource.getConnection();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return "data source";
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java b/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java
deleted file mode 100644
index d39f43fb..00000000
--- a/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- *
- * Copyright 2015-2024 the original author or authors.
- */
-package org.assertj.db.type;
-
-import java.io.PrintWriter;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.SQLFeatureNotSupportedException;
-import java.util.logging.Logger;
-import javax.sql.DataSource;
-
-import org.assertj.db.type.lettercase.LetterCase;
-import org.assertj.db.type.lettercase.WithLetterCase;
-
-/**
- * A data source to connect to the database with letter case.
- *
- * @author Régis Pouiller
- * @since 1.1.0
- */
-public class DataSourceWithLetterCase implements DataSource, WithLetterCase {
-
- /**
- * The data source.
- */
- private final DataSource dataSource;
- /**
- * Letter case of the tables.
- */
- private final LetterCase tableLetterCase;
- /**
- * Letter case of the columns.
- */
- private final LetterCase columnLetterCase;
- /**
- * Letter case of the primary keys.
- */
- private final LetterCase primaryKeyLetterCase;
-
- /**
- * Constructor.
- *
- * @param dataSource The data source.
- * @param tableLetterCase Letter case of the tables.
- * @param columnLetterCase Letter case of the columns.
- * @param primaryKeyLetterCase Letter case of the primary keys.
- */
- public DataSourceWithLetterCase(DataSource dataSource, LetterCase tableLetterCase,
- LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
-
- this.dataSource = dataSource;
- this.tableLetterCase = tableLetterCase;
- this.columnLetterCase = columnLetterCase;
- this.primaryKeyLetterCase = primaryKeyLetterCase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LetterCase getColumnLetterCase() {
- return columnLetterCase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LetterCase getPrimaryKeyLetterCase() {
- return primaryKeyLetterCase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public LetterCase getTableLetterCase() {
- return tableLetterCase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Connection getConnection() throws SQLException {
- return dataSource.getConnection();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Connection getConnection(String username, String password) throws SQLException {
- return dataSource.getConnection(username, password);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PrintWriter getLogWriter() throws SQLException {
- return dataSource.getLogWriter();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setLogWriter(PrintWriter out) throws SQLException {
- dataSource.setLogWriter(out);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getLoginTimeout() throws SQLException {
- return dataSource.getLoginTimeout();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setLoginTimeout(int seconds) throws SQLException {
- dataSource.setLoginTimeout(seconds);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Logger getParentLogger() throws SQLFeatureNotSupportedException {
- return dataSource.getParentLogger();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T unwrap(Class iface) throws SQLException {
- return dataSource.unwrap(iface);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isWrapperFor(Class> iface) throws SQLException {
- return dataSource.isWrapperFor(iface);
- }
-}
diff --git a/src/main/java/org/assertj/db/type/FromConnectionSchemaMetadata.java b/src/main/java/org/assertj/db/type/FromConnectionSchemaMetadata.java
new file mode 100644
index 00000000..1dd81208
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/FromConnectionSchemaMetadata.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.assertj.db.exception.AssertJDBException;
+
+/**
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+class FromConnectionSchemaMetadata implements SchemaMetadata {
+
+ private final ConnectionProvider connectionProvider;
+
+ public FromConnectionSchemaMetadata(ConnectionProvider connectionProvider) {
+ this.connectionProvider = connectionProvider;
+ }
+
+ /**
+ * Returns the catalog from a connection.
+ *
+ * @param connection The connection with the catalog
+ * @return The catalog from a connection.
+ * @throws SQLException SQL Exception
+ */
+ private static String getCatalog(Connection connection) throws SQLException {
+ try {
+ return connection.getCatalog();
+ } catch (SQLException exception) {
+ throw exception;
+ } catch (Exception throwable) {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the schema from a connection.
+ *
+ * @param connection The connection with the catalog
+ * @return The schema from a connection.
+ * @throws SQLException SQL Exception
+ */
+ private static String getSchema(Connection connection) throws SQLException {
+ try {
+ return connection.getSchema();
+ } catch (SQLException exception) {
+ throw exception;
+ } catch (Exception throwable) {
+ return null;
+ }
+ }
+
+ @Override
+ public Collection getTablesName() {
+ try (Connection connection = connectionProvider.getConnection()) {
+ List tables = new ArrayList<>();
+ DatabaseMetaData metaData = connection.getMetaData();
+ try (ResultSet tableResultSet = metaData.getTables(getCatalog(connection), getSchema(connection), null, new String[]{"TABLE"})) {
+ while (tableResultSet.next()) {
+ String tableName = tableResultSet.getString("TABLE_NAME");
+ tables.add(tableName);
+ }
+ }
+ return tables;
+ } catch (SQLException e) {
+ throw new AssertJDBException(e);
+ }
+ }
+
+ @Override
+ public Collection getColumnsName(String tableName) {
+ try (Connection connection = connectionProvider.getConnection()) {
+ List columnsList = new ArrayList<>();
+ try (ResultSet columnsResultSet = connection.getMetaData().getColumns(getCatalog(connection), getSchema(connection), tableName, null)) {
+ while (columnsResultSet.next()) {
+ String column = columnsResultSet.getString("COLUMN_NAME");
+ columnsList.add(column);
+ }
+ }
+ return columnsList;
+ } catch (SQLException e) {
+ throw new AssertJDBException(e);
+ }
+ }
+
+ @Override
+ public Collection getPrimaryKeys(String tableName) {
+ try (Connection connection = connectionProvider.getConnection()) {
+ List pksNameList = new ArrayList<>();
+ try (ResultSet resultSet = connection.getMetaData().getPrimaryKeys(getCatalog(connection), getSchema(connection), tableName)) {
+ while (resultSet.next()) {
+ String pkName = resultSet.getString("COLUMN_NAME");
+ pksNameList.add(pkName);
+ }
+ }
+ return pksNameList;
+ } catch (SQLException e) {
+ throw new AssertJDBException(e);
+ }
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/JdbcUrlConnectionProvider.java b/src/main/java/org/assertj/db/type/JdbcUrlConnectionProvider.java
new file mode 100644
index 00000000..a757e9f9
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/JdbcUrlConnectionProvider.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+import org.assertj.db.type.lettercase.LetterCase;
+
+/**
+ * The implementation of {@link ConnectionProvider} from JDBC url connection info.
+ * Use {@link AssertDbConnectionFactory} for instantiate.
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public class JdbcUrlConnectionProvider extends AbstractConnectionProvider {
+
+ private final String url;
+ private final String user;
+ private final String password;
+
+ JdbcUrlConnectionProvider(String url, String user, String password,
+ Class extends SchemaMetadata> schemaMetadataType,
+ LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) {
+
+ super(schemaMetadataType, tableLetterCase, columnLetterCase, primaryKeyLetterCase);
+ this.url = url;
+ this.user = user;
+ this.password = password;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Connection getConnection() throws SQLException {
+ return DriverManager.getConnection(this.url, this.user, this.password);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return this.user + "/" + this.url;
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/Request.java b/src/main/java/org/assertj/db/type/Request.java
index e4793557..90cd5e02 100644
--- a/src/main/java/org/assertj/db/type/Request.java
+++ b/src/main/java/org/assertj/db/type/Request.java
@@ -20,15 +20,14 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import javax.sql.DataSource;
import org.assertj.db.type.lettercase.LetterCase;
/**
* A request in the database to get values.
*
- * The different information of the request are connection or data source, the SQL request and optionally the parameters
- * of the SQL request.
+ * The different information of the request are the SQL request and optionally the parameters of the SQL request.
+ * A Request should be constructed by the fluent builder {@link Request.Builder} from a AssertDbConnection instance.
*
*
* Examples of instantiation :
@@ -36,74 +35,71 @@
*
* -
*
- * This {@link Request} point to a request without parameter in a H2 database in memory like indicated in the
- * {@link Source}.
+ * This {@link Request} point to a request without parameter in a H2 database in memory.
*
*
*
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- * Request request = new Request(source, "select title from movie;");
+ * AssertDbConnection connection = AssertDbConnectionFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Request request = connection.request("select title from movie;").build();
*
*
*
* -
*
* Below the {@link Request} point to a request with {@code 2000} in parameter.
- * The {@link Request} use a {@code DataSource} instead of a {@link Source} like above.
+ * The {@link AssertDbConnection} use a {@code DataSource} instead of a JDBC url like above.
*
*
*
* DataSource dataSource = ...;
- * Request request = new Request(dataSource, "select title from movie where year > ?;", 2000);
+ * AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
+ * Request request = connection.request("select title from movie where year > ?;").parameters(2000).build();
*
*
*
*
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class Request extends AbstractDbData {
/**
* SQL request to get the values.
*/
- private String request;
+ private final String request;
/**
* Parameters of the SQL request.
*/
- private Object[] parameters;
-
- /**
- * Default constructor.
- */
- public Request() {
- super(Request.class, DataType.REQUEST);
- }
+ private final Object[] parameters;
/**
* Constructor with a connection.
*
- * @param source Source to connect to the database.
- * @param request SQL Request to get the values.
- * @param parameters Parameters of the SQL request.
+ * @param connectionProvider Connection provider to connect to the database.
+ * @param request SQL Request to get the values.
+ * @param parameters Parameters of the SQL request.
+ * @since 3.0.0
*/
- public Request(Source source, String request, Object... parameters) {
- super(Request.class, DataType.REQUEST, source);
- setRequest(request);
+ private Request(ConnectionProvider connectionProvider, String request, Object[] parameters, String[] pksName) {
+ super(Request.class, DataType.REQUEST, connectionProvider);
+ if (request == null) {
+ throw new IllegalArgumentException("request can not be null");
+ }
+ if (pksName != null) {
+ super.setPksNameList(new ArrayList<>(Arrays.asList(pksName)));
+ }
+ this.request = request;
this.parameters = parameters;
}
/**
- * Constructor with a data source.
- *
- * @param dataSource Data source.
- * @param request SQL Request to get the values.
- * @param parameters Parameters of the SQL request.
+ * Only used for tests.
*/
- public Request(DataSource dataSource, String request, Object... parameters) {
- super(Request.class, DataType.REQUEST, dataSource);
- setRequest(request);
- this.parameters = parameters;
+ private Request() {
+ super(Request.class, DataType.REQUEST);
+ this.request = null;
+ this.parameters = null;
}
/**
@@ -115,22 +111,6 @@ public String getRequest() {
return request;
}
- /**
- * Sets the SQL request.
- *
- * @param request The SQL request.
- * @return The SQL request.
- * @throws NullPointerException If the {@link #request} field is {@code null}.
- */
- public Request setRequest(String request) {
- if (request == null) {
- throw new NullPointerException("request can not be null");
- }
-
- this.request = request;
- return this;
- }
-
/**
* The parameters of the SQL request.
*
@@ -138,34 +118,11 @@ public Request setRequest(String request) {
*/
public Object[] getParameters() {
if (parameters == null) {
- return null;
+ return new Object[0];
}
return parameters.clone();
}
- /**
- * Sets the parameters of the SQL request.
- *
- * @param parameters The parameters of the SQL request.
- * @return The parameters of the SQL request.
- */
- public Request setParameters(Object... parameters) {
- this.parameters = parameters;
- return this;
- }
-
- /**
- * Sets the primary keys name.
- *
- * @param pksName The primary keys name.
- * @return {@code this} instance.
- */
- public Request setPksName(String... pksName) {
- List pksNameList = new ArrayList<>(Arrays.asList(pksName));
- super.setPksNameList(pksNameList);
- return this;
- }
-
/**
* Collects the columns name from the {@code ResultSet} from the SQL request.
*
@@ -212,4 +169,61 @@ protected void loadImpl(Connection connection) throws SQLException {
}
}
}
+
+ /**
+ * Fluent {@link Request} builder.
+ * Use {@link AssertDbConnection} to construct new instance of this builder.
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Request request = connection.request("select * from actor;").build();
+ * Request request = connection.request("select * from actor where id = ?;").parameters(1).build();
+ *
+ *
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+ public static class Builder {
+ private final ConnectionProvider connectionProvider;
+ private final String request;
+ private Object[] parameters = new Object[0];
+ private String[] pksName = null;
+
+ Builder(ConnectionProvider connectionProvider, String request) {
+ this.connectionProvider = connectionProvider;
+ this.request = request;
+ }
+
+ /**
+ * Specify parameters to use in SQL request.
+ *
+ * @param parameters List of SQL parameters.
+ * @return Current builder instance.
+ */
+ public Request.Builder parameters(Object... parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+ /**
+ * Set the list of primary keys
+ *
+ * @param pksName List of column name to use as primary keys.
+ * @return Current builder instance.
+ */
+ public Request.Builder pksName(String... pksName) {
+ this.pksName = pksName;
+ return this;
+ }
+
+ /**
+ * Build the Request instance.
+ *
+ * @return Request instance to use in assertThat.
+ */
+ public Request build() {
+ return new Request(this.connectionProvider, this.request, this.parameters, this.pksName);
+ }
+ }
}
diff --git a/src/main/java/org/assertj/db/type/SchemaMetaDataMode.java b/src/main/java/org/assertj/db/type/SchemaMetaDataMode.java
new file mode 100644
index 00000000..2f43930a
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/SchemaMetaDataMode.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+/**
+ * Define existing schema metadata retrieval mode.
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public enum SchemaMetaDataMode {
+ /**
+ * Retrieve schema metadata only once and keep in memory for all duration of connection provider.
+ * To use when database schema is not modified during tests.
+ */
+ STATIC(CachedSchemaMetaData.class),
+ /**
+ * Retrieve schema metadata each time is required.
+ * To use when database schema is modified during tests.
+ */
+ DYNAMIC(FromConnectionSchemaMetadata.class);
+
+
+ private final Class extends SchemaMetadata> type;
+
+ SchemaMetaDataMode(Class extends SchemaMetadata> type) {
+ this.type = type;
+ }
+
+ /**
+ * Return the underline java type that implement the strategy.
+ *
+ * @return Class to use for instantiate the schema retriever.
+ */
+ Class extends SchemaMetadata> getType() {
+ return type;
+ }
+}
diff --git a/src/main/java/org/assertj/db/type/SchemaMetadata.java b/src/main/java/org/assertj/db/type/SchemaMetadata.java
new file mode 100644
index 00000000..f3190327
--- /dev/null
+++ b/src/main/java/org/assertj/db/type/SchemaMetadata.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2015-2024 the original author or authors.
+ */
+package org.assertj.db.type;
+
+import java.util.Collection;
+
+/**
+ * Represent access to a database schema metadata.
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+public interface SchemaMetadata {
+
+ /**
+ * Return list of name of tables discovered in database schema.
+ *
+ * @return List of table names
+ */
+ Collection getTablesName();
+
+ /**
+ * Return list of name of columns discovered in database schema.
+ *
+ * @param tableName Name of table to discover.
+ * @return List of table names
+ */
+ Collection getColumnsName(String tableName);
+
+ /**
+ * Return list of primary keys discovered in database schema.
+ *
+ * @param tableName Name of table to discover.
+ * @return List of primary keys
+ */
+ Collection getPrimaryKeys(String tableName);
+
+}
diff --git a/src/main/java/org/assertj/db/type/Source.java b/src/main/java/org/assertj/db/type/Source.java
deleted file mode 100644
index afee685e..00000000
--- a/src/main/java/org/assertj/db/type/Source.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- *
- * Copyright 2015-2024 the original author or authors.
- */
-package org.assertj.db.type;
-
-/**
- * A source to indicates the information to connect to the database. It contains the url, user and password to the
- * database. A source is used by a {@link Table} or a {@link Request}.
- * Example of instantiation :
- *
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- *
- * That creates a source to a H2 database in memory.
- *
- * @author Régis Pouiller
- */
-public class Source {
-
- /**
- * URL to the database.
- */
- private final String url;
- /**
- * User to connect.
- */
- private final String user;
- /**
- * Password to connect.
- */
- private final String password;
-
- /**
- * Constructor with the information.
- *
- * @param url URL to the database.
- * @param user User to connect.
- * @param password Password to connect.
- */
- public Source(String url, String user, String password) {
- this.url = url;
- this.user = user;
- this.password = password;
- }
-
- /**
- * Returns the URL to the database.
- *
- * @return The URL to the database.
- */
- public String getUrl() {
- return url;
- }
-
- /**
- * Returns the user to connect.
- *
- * @return The user to connect.
- */
- public String getUser() {
- return user;
- }
-
- /**
- * Returns the password to connect.
- *
- * @return The password to connect.
- */
- public String getPassword() {
- return password;
- }
-}
diff --git a/src/main/java/org/assertj/db/type/Table.java b/src/main/java/org/assertj/db/type/Table.java
index 8228ea68..ffc35219 100644
--- a/src/main/java/org/assertj/db/type/Table.java
+++ b/src/main/java/org/assertj/db/type/Table.java
@@ -21,7 +21,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import javax.sql.DataSource;
import org.assertj.db.exception.AssertJDBException;
import org.assertj.db.type.lettercase.LetterCase;
@@ -30,8 +29,8 @@
/**
* A table in the database to read to get the values.
*
- * The different information of the table are {@link Source} or {@link DataSource}, name of the table and optionally
- * the columns to check and to exclude.
+ * The different information of the table are name of the table and optionally the columns to check and to exclude.
+ * A table should be constructed by the fluent builder {@link Table.Builder} from a AssertDbConnection instance.
*
*
* Examples of instantiation :
@@ -39,14 +38,13 @@
*
* -
*
- * This {@link Table} point to a table called {@code movie} in a H2 database in memory like indicated in the
- * {@link Source}.
+ * This {@link Table} point to a table called {@code movie} in a H2 database in memory.
*
*
*
*
- * Source source = new Source("jdbc:h2:mem:test", "sa", "");
- * Table table = new Table(source, "movie");
+ * AssertDbConnection connection = AssertDbConnectionFactory.of("jdbc:h2:mem:test", "sa", "").create();
+ * Table table = connection.table("movie").build();
*
*
*
@@ -57,14 +55,15 @@
* {@code number} and {@code title}).
* And the {@link Table} {@code table2} point to a table called {@code musician} (but ignore on the column called
* {@code birthday}).
- * The {@link Table} use a {@code DataSource} instead of a {@link Source} like above.
+ * The {@link AssertDbConnection} use a {@code DataSource} instead of a JDBC url like above.
*
*
*
*
* DataSource dataSource = ...;
- * Table table1 = new Table(dataSource, "song", new String[] { "number", "title" }, null);
- * Table table2 = new Table(dataSource, "musician", null, new String[] { "birthday" });
+ * AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
+ * Table table1 = connection.table("song").columnsToCheck(new String[] { "number", "title" }).build();
+ * Table table2 = connection..table("musician").columnsToExclude(new String[] { "birthday" }).build();
*
*
*
@@ -72,6 +71,7 @@
*
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class Table extends AbstractDbData {
@@ -110,210 +110,24 @@ public class Table extends AbstractDbData {
*/
private Character endDelimiter = null;
- /**
- * Default constructor.
- */
- public Table() {
- super(Table.class, DataType.TABLE);
- }
-
- /**
- * Constructor with a {@link Source} and the name of the table.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- */
- public Table(Source source, String name) {
- this(source, name, null, (String[]) null);
- }
-
- /**
- * Constructor with a {@link Source}, the name of the table and the columns to check and to exclude.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- */
- public Table(Source source, String name, String[] columnsToCheck, String[] columnsToExclude) {
- this(source, name, null, columnsToCheck, columnsToExclude);
- }
-
- /**
- * Constructor with a dataSource and the name of the table.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- */
- public Table(DataSource dataSource, String name) {
- this(dataSource, name, null, (String[]) null);
- }
-
- /**
- * Constructor with a connection, the name of the table and the columns to check and to exclude.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- */
- public Table(DataSource dataSource, String name, String[] columnsToCheck, String[] columnsToExclude) {
- this(dataSource, name, null, columnsToCheck, columnsToExclude);
- }
-
- /**
- * Constructor with a {@link Source} and the name of the table.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param columnsToOrder List of column to use as ORDER BY
- * @since 1.2.0
- */
- public Table(Source source, String name, Order[] columnsToOrder) {
- this(source, name, columnsToOrder, null, null);
- }
-
- /**
- * Constructor with a {@link Source}, the name of the table and the columns to check and to exclude.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param columnsToOrder List of column to use as ORDER BY
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- * @since 1.2.0
- */
- public Table(Source source, String name, Order[] columnsToOrder, String[] columnsToCheck, String[] columnsToExclude) {
- this(source, name, null, null, columnsToOrder, columnsToCheck, columnsToExclude);
- }
-
- /**
- * Constructor with a dataSource and the name of the table.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param columnsToOrder List of column to use as ORDER BY
- * @since 1.2.0
- */
- public Table(DataSource dataSource, String name, Order[] columnsToOrder) {
- this(dataSource, name, columnsToOrder, null, null);
- }
-
- /**
- * Constructor with a connection, the name of the table and the columns to check and to exclude.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param columnsToOrder List of column to use as ORDER BY
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- * @since 1.2.0
- */
- public Table(DataSource dataSource, String name, Order[] columnsToOrder, String[] columnsToCheck, String[] columnsToExclude) {
- this(dataSource, name, null, null, columnsToOrder, columnsToCheck, columnsToExclude);
- }
-
- /**
- * Constructor with a {@link Source} and the name of the table.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @since 1.2.0
- */
- public Table(Source source, String name, Character startDelimiter, Character endDelimiter) {
- this(source, name, startDelimiter, endDelimiter, null, null, null);
- }
-
- /**
- * Constructor with a {@link Source}, the name of the table and the columns to check and to exclude.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- * @since 1.2.0
- */
- public Table(Source source, String name, Character startDelimiter, Character endDelimiter, String[] columnsToCheck,
- String[] columnsToExclude) {
- this(source, name, startDelimiter, endDelimiter, null, columnsToCheck, columnsToExclude);
- }
-
- /**
- * Constructor with a dataSource and the name of the table.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @since 1.2.0
- */
- public Table(DataSource dataSource, String name, Character startDelimiter, Character endDelimiter) {
- this(dataSource, name, startDelimiter, endDelimiter, null, null, null);
- }
/**
- * Constructor with a connection, the name of the table and the columns to check and to exclude.
+ * Constructor with a {@link ConnectionProvider}, the name of the table and the columns to check and to exclude.
*
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- * @since 1.2.0
+ * @param connectionProvider {@link ConnectionProvider} to connect to the database.
+ * @param name Name of the table.
+ * @param startDelimiter Start delimiter for column name and table name.
+ * @param endDelimiter End delimiter for column name and table name.
+ * @param columnsToOrder List of column to use as ORDER BY
+ * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
+ * columns.
+ * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
+ * column.
+ * @since 3.0.0
*/
- public Table(DataSource dataSource, String name, Character startDelimiter, Character endDelimiter, String[] columnsToCheck,
- String[] columnsToExclude) {
- this(dataSource, name, startDelimiter, endDelimiter, null, columnsToCheck, columnsToExclude);
- }
-
- /**
- * Constructor with a {@link Source} and the name of the table.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @param columnsToOrder List of column to use as ORDER BY
- * @since 1.2.0
- */
- public Table(Source source, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder) {
- this(source, name, startDelimiter, endDelimiter, columnsToOrder, null, null);
- }
-
- /**
- * Constructor with a {@link Source}, the name of the table and the columns to check and to exclude.
- *
- * @param source {@link Source} to connect to the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @param columnsToOrder List of column to use as ORDER BY
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- * @since 1.2.0
- */
- public Table(Source source, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder,
- String[] columnsToCheck, String[] columnsToExclude) {
- super(Table.class, DataType.TABLE, source);
+ private Table(ConnectionProvider connectionProvider, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder,
+ String[] columnsToCheck, String[] columnsToExclude) {
+ super(Table.class, DataType.TABLE, connectionProvider);
setName(name);
setStartDelimiter(startDelimiter);
setEndDelimiter(endDelimiter);
@@ -323,42 +137,10 @@ public Table(Source source, String name, Character startDelimiter, Character end
}
/**
- * Constructor with a dataSource and the name of the table.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @param columnsToOrder List of column to use as ORDER BY
- * @since 1.2.0
+ * Only used for tests.
*/
- public Table(DataSource dataSource, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder) {
- this(dataSource, name, startDelimiter, endDelimiter, columnsToOrder, null, null);
- }
-
- /**
- * Constructor with a connection, the name of the table and the columns to check and to exclude.
- *
- * @param dataSource DataSource of the database.
- * @param name Name of the table.
- * @param startDelimiter Start delimiter for column name and table name.
- * @param endDelimiter End delimiter for column name and table name.
- * @param columnsToOrder List of column to use as ORDER BY
- * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the
- * columns.
- * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no
- * column.
- * @since 1.2.0
- */
- public Table(DataSource dataSource, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder,
- String[] columnsToCheck, String[] columnsToExclude) {
- super(Table.class, DataType.TABLE, dataSource);
- setName(name);
- setStartDelimiter(startDelimiter);
- setEndDelimiter(endDelimiter);
- setColumnsToOrder(columnsToOrder);
- setColumnsToCheck(columnsToCheck);
- setColumnsToExclude(columnsToExclude);
+ private Table() {
+ super(Table.class, DataType.TABLE);
}
/**
@@ -378,65 +160,34 @@ public String getName() {
* @return The actual instance.
* @see #getName()
*/
- public Table setName(String name) {
+ private Table setName(String name) {
if (name == null) {
- throw new NullPointerException("name can not be null");
+ throw new IllegalArgumentException("name can not be null");
}
this.name = name;
setNameFromDb();
return this;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public Table setDataSource(DataSource dataSource) {
- Table table = super.setDataSource(dataSource);
- setNameFromDb();
- return table;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Table setSource(Source source) {
- Table table = super.setSource(source);
- setNameFromDb();
- return table;
- }
-
/**
* Set the name from the corresponding name in the database.
*/
private void setNameFromDb() {
- if (name != null && (getSource() != null || getDataSource() != null)) {
- try (Connection connection = getConnection()) {
- LetterCase tableLetterCase = getTableLetterCase();
- LetterCase columnLetterCase = getColumnLetterCase();
-
- DatabaseMetaData metaData = connection.getMetaData();
- try (ResultSet tableResultSet = metaData.getTables(getCatalog(connection), getSchema(connection), null,
- new String[]{"TABLE"})) {
- while (tableResultSet.next()) {
- String tableName = tableResultSet.getString("TABLE_NAME");
- if (tableLetterCase.isEqual(tableName, name)) {
- name = tableLetterCase.convert(tableName);
- break;
- }
- }
+ if (name != null && this.getConnectionProvider() != null) {
+
+ LetterCase tableLetterCase = getTableLetterCase();
+ LetterCase columnLetterCase = getColumnLetterCase();
+ SchemaMetadata metaData = getMetaData();
+ for (String tableName : metaData.getTablesName()) {
+ if (tableLetterCase.isEqual(tableName, name)) {
+ name = tableLetterCase.convert(tableName);
+ break;
}
+ }
- columnsList = new ArrayList<>();
- try (ResultSet columnsResultSet = metaData.getColumns(getCatalog(connection), getSchema(connection), name, null)) {
- while (columnsResultSet.next()) {
- String column = columnsResultSet.getString("COLUMN_NAME");
- columnsList.add(columnLetterCase.convert(column));
- }
- }
- } catch (SQLException e) {
- throw new AssertJDBException(e);
+ columnsList = new ArrayList<>();
+ for (String column : metaData.getColumnsName(name)) {
+ columnsList.add(columnLetterCase.convert(column));
}
}
}
@@ -463,28 +214,30 @@ public String[] getColumnsToCheck() {
* @throws NullPointerException If one of the name in {@code columnsToCheck} is {@code null}.
* @see #getColumnsToCheck()
*/
- public Table setColumnsToCheck(String[] columnsToCheck) {
+ private Table setColumnsToCheck(String[] columnsToCheck) {
+ if (columnsToCheck == null) {
+ this.columnsToCheck = null;
+ return this;
+ }
+
if (columnsList == null) {
- throw new AssertJDBException("The table name and the source or datasource must be set first");
+ throw new AssertJDBException("The table name and the connectionProvider must be set first");
}
- if (columnsToCheck != null) {
- LetterCase letterCase = getColumnLetterCase();
- // If the parameter is not null, all the names are convert
- // before setting the instance field
- List columnsToCheckList = new ArrayList<>();
- for (String column : columnsToCheck) {
- if (column == null) {
- throw new NullPointerException("The name of the column can not be null");
- }
- int indexOf = NameComparator.INSTANCE.indexOf(columnsList, column, letterCase);
- if (indexOf != -1) {
- columnsToCheckList.add(columnsList.get(indexOf));
- }
+
+ LetterCase letterCase = getColumnLetterCase();
+ // If the parameter is not null, all the names are convert
+ // before setting the instance field
+ List columnsToCheckList = new ArrayList<>();
+ for (String column : columnsToCheck) {
+ if (column == null) {
+ throw new NullPointerException("The name of the column can not be null");
+ }
+ int indexOf = NameComparator.INSTANCE.indexOf(columnsList, column, letterCase);
+ if (indexOf != -1) {
+ columnsToCheckList.add(columnsList.get(indexOf));
}
- this.columnsToCheck = columnsToCheckList.toArray(new String[0]);
- } else {
- this.columnsToCheck = null;
}
+ this.columnsToCheck = columnsToCheckList.toArray(new String[0]);
return this;
}
@@ -508,27 +261,29 @@ public String[] getColumnsToExclude() {
* @return The actual instance.
* @see #getColumnsToExclude()
*/
- public Table setColumnsToExclude(String[] columnsToExclude) {
+ private Table setColumnsToExclude(String[] columnsToExclude) {
+ if (columnsToExclude == null) {
+ this.columnsToExclude = null;
+ return this;
+ }
+
if (columnsList == null) {
- throw new AssertJDBException("The table name and the source or datasource must be set first");
+ throw new AssertJDBException("The table name and the connectionProvider must be set first");
}
- if (columnsToExclude != null) {
- LetterCase letterCase = getColumnLetterCase();
- this.columnsToExclude = new String[columnsToExclude.length];
- List columnsToExcludeList = new ArrayList<>();
- for (String column : columnsToExclude) {
- if (column == null) {
- throw new NullPointerException("The name of the column can not be null");
- }
- int indexOf = NameComparator.INSTANCE.indexOf(columnsList, column, letterCase);
- if (indexOf != -1) {
- columnsToExcludeList.add(columnsList.get(indexOf));
- }
+
+ LetterCase letterCase = getColumnLetterCase();
+ this.columnsToExclude = new String[columnsToExclude.length];
+ List columnsToExcludeList = new ArrayList<>();
+ for (String column : columnsToExclude) {
+ if (column == null) {
+ throw new NullPointerException("The name of the column can not be null");
+ }
+ int indexOf = NameComparator.INSTANCE.indexOf(columnsList, column, letterCase);
+ if (indexOf != -1) {
+ columnsToExcludeList.add(columnsList.get(indexOf));
}
- this.columnsToExclude = columnsToExcludeList.toArray(new String[0]);
- } else {
- this.columnsToExclude = null;
}
+ this.columnsToExclude = columnsToExcludeList.toArray(new String[0]);
return this;
}
@@ -552,32 +307,34 @@ public Order[] getColumnsToOrder() {
* @return The actual instance.
* @see #getColumnsToOrder()
*/
- public Table setColumnsToOrder(Order[] columnsToOrder) {
+ private Table setColumnsToOrder(Order[] columnsToOrder) {
+ if (columnsToOrder == null) {
+ this.columnsToOrder = null;
+ return this;
+ }
+
if (columnsList == null) {
- throw new AssertJDBException("The table name and the source or datasource must be set first");
+ throw new AssertJDBException("The table name and the connectionProvider must be set first");
}
- if (columnsToOrder != null) {
- LetterCase letterCase = getColumnLetterCase();
- this.columnsToOrder = new Order[columnsToOrder.length];
- List columnsToOrderList = new ArrayList<>();
- for (Order order : columnsToOrder) {
- if (order == null) {
- throw new NullPointerException("The order can not be null");
- }
- String column = order.getName();
- if (column == null) {
- throw new NullPointerException("The name of the column for order can not be null");
- }
- int indexOf = NameComparator.INSTANCE.indexOf(columnsList, column, letterCase);
- if (indexOf != -1) {
- String columnName = columnsList.get(indexOf);
- columnsToOrderList.add(Order.getOrder(columnName, order.getType()));
- }
+
+ LetterCase letterCase = getColumnLetterCase();
+ this.columnsToOrder = new Order[columnsToOrder.length];
+ List columnsToOrderList = new ArrayList<>();
+ for (Order order : columnsToOrder) {
+ if (order == null) {
+ throw new NullPointerException("The order can not be null");
+ }
+ String column = order.getName();
+ if (column == null) {
+ throw new NullPointerException("The name of the column for order can not be null");
+ }
+ int indexOf = NameComparator.INSTANCE.indexOf(columnsList, column, letterCase);
+ if (indexOf != -1) {
+ String columnName = columnsList.get(indexOf);
+ columnsToOrderList.add(Order.getOrder(columnName, order.getType()));
}
- this.columnsToOrder = columnsToOrderList.toArray(new Order[0]);
- } else {
- this.columnsToOrder = null;
}
+ this.columnsToOrder = columnsToOrderList.toArray(new Order[0]);
return this;
}
@@ -600,7 +357,7 @@ public Character getStartDelimiter() {
* @see #getStartDelimiter()
* @since 1.2.0
*/
- public Table setStartDelimiter(Character startDelimiter) {
+ private Table setStartDelimiter(Character startDelimiter) {
this.startDelimiter = startDelimiter;
return this;
}
@@ -624,7 +381,7 @@ public Character getEndDelimiter() {
* @see #getEndDelimiter()
* @since 1.2.0
*/
- public Table setEndDelimiter(Character endDelimiter) {
+ private Table setEndDelimiter(Character endDelimiter) {
this.endDelimiter = endDelimiter;
return this;
}
@@ -725,38 +482,28 @@ private void collectColumnsNameFromResultSet(ResultSet resultSet) throws SQLExce
* This method use the {@link DatabaseMetaData} from the {@code Connection} parameter to list the primary keys of the
* table.
*
- *
- * @param connection The {@code Connection} to the database.
- * @throws SQLException SQL Exception.
*/
- private void collectPrimaryKeyName(Connection connection) throws SQLException {
- String catalog = getCatalog(connection);
- String schema = getSchema(connection);
+ private void collectPrimaryKeyName() {
List pksNameList = new ArrayList<>();
- DatabaseMetaData metaData = connection.getMetaData();
+ SchemaMetadata metaData = getMetaData();
String tableName = name;
- try (ResultSet resultSet = metaData.getTables(catalog, schema, null, new String[]{"TABLE"})) {
- LetterCase letterCase = getTableLetterCase();
- while (resultSet.next()) {
- String tableResult = resultSet.getString("TABLE_NAME");
- if (letterCase.isEqual(tableName, tableResult)) {
- tableName = tableResult;
- break;
- }
+ LetterCase letterCase = getTableLetterCase();
+ for (String tableResult : metaData.getTablesName()) {
+ if (letterCase.isEqual(tableName, tableResult)) {
+ tableName = tableResult;
+ break;
}
}
- try (ResultSet resultSet = metaData.getPrimaryKeys(catalog, schema, tableName)) {
- LetterCase letterCase = getPrimaryKeyLetterCase();
- while (resultSet.next()) {
- String columnName = resultSet.getString("COLUMN_NAME");
- if (NameComparator.INSTANCE.contains(getColumnsNameList(), columnName, letterCase)) {
- String pkName = letterCase.convert(columnName);
- pksNameList.add(pkName);
- }
+ LetterCase pkLetterCase = getPrimaryKeyLetterCase();
+ for (String primaryKey : metaData.getPrimaryKeys(tableName)) {
+ if (NameComparator.INSTANCE.contains(getColumnsNameList(), primaryKey, pkLetterCase)) {
+ String pkName = pkLetterCase.convert(primaryKey);
+ pksNameList.add(pkName);
}
}
+
setPksNameList(pksNameList);
}
@@ -780,12 +527,96 @@ protected void loadImpl(Connection connection) throws SQLException {
collectRowsFromResultSet(resultSet);
}
}
- collectPrimaryKeyName(connection);
+ collectPrimaryKeyName();
if (columnsToOrder == null) {
sortRows();
}
}
+ /**
+ * Fluent {@link Table} builder.
+ * Use {@link AssertDbConnection} to construct new instance of this builder.
+ *
+ *
+ * AssertDbConnection connection = ....;
+ * Table table = connection.table("movie").build();
+ * Table table2 = connection.table("movie").columnToCheck(new String[] { "number", "title" }).build();
+ *
+ *
+ *
+ * @author Julien Roy
+ * @since 3.0.0
+ */
+ public static class Builder {
+ private final ConnectionProvider connectionProvider;
+ private final String name;
+ private Order[] columnsToOrder;
+ private Character startDelimiter;
+ private Character endDelimiter;
+ private String[] columnsToCheck;
+ private String[] columnsToExclude;
+
+ Builder(ConnectionProvider connectionProvider, String name) {
+ this.connectionProvider = connectionProvider;
+ this.name = name;
+ }
+
+ /**
+ * Set order to use in SQL queries.
+ *
+ * @param columnsToOrder List of column to use as ORDER BY.
+ * @return Current builder instance.
+ */
+ public Builder columnsToOrder(Order[] columnsToOrder) {
+ this.columnsToOrder = columnsToOrder;
+ return this;
+ }
+
+ /**
+ * Set delimiters to use in SQL queries.
+ *
+ * @param startDelimiter Start delimiter for column name and table name.
+ * @param endDelimiter End delimiter for column name and table name.
+ * @return Current builder instance
+ */
+ public Builder delimiters(Character startDelimiter, Character endDelimiter) {
+ this.startDelimiter = startDelimiter;
+ this.endDelimiter = endDelimiter;
+ return this;
+ }
+
+ /**
+ * Set the columns to check.
+ *
+ * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the columns.
+ * @return Current builder instance.
+ */
+ public Builder columnsToCheck(String[] columnsToCheck) {
+ this.columnsToCheck = columnsToCheck;
+ return this;
+ }
+
+ /**
+ * Set the columns to exclude.
+ *
+ * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no column.
+ * @return Current builder instance.
+ */
+ public Builder columnsToExclude(String[] columnsToExclude) {
+ this.columnsToExclude = columnsToExclude;
+ return this;
+ }
+
+ /**
+ * Build the Table instance.
+ *
+ * @return Table instance to use in assertThat.
+ */
+ public Table build() {
+ return new Table(this.connectionProvider, this.name, this.startDelimiter, this.endDelimiter, this.columnsToOrder, this.columnsToCheck, this.columnsToExclude);
+ }
+ }
+
/**
* Indicates an order with the name on which is the order and the type.
*
diff --git a/src/main/java/org/assertj/db/util/Descriptions.java b/src/main/java/org/assertj/db/util/Descriptions.java
index 07a0ae04..e69f9d0e 100644
--- a/src/main/java/org/assertj/db/util/Descriptions.java
+++ b/src/main/java/org/assertj/db/util/Descriptions.java
@@ -20,7 +20,6 @@
import org.assertj.db.type.ChangeType;
import org.assertj.db.type.Changes;
import org.assertj.db.type.Request;
-import org.assertj.db.type.Source;
import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
@@ -91,12 +90,7 @@ public static String getDescription(Changes changes) {
stringBuilder.append("Changes");
}
}
- if (changes.getSource() != null) {
- Source source = changes.getSource();
- stringBuilder.append(" of '").append(source.getUser()).append("/").append(source.getUrl()).append("' source");
- } else {
- stringBuilder.append(" of a data source");
- }
+ stringBuilder.append(" of '").append(changes.getConnectionProvider().toString()).append("'");
return stringBuilder.toString();
}
diff --git a/src/main/javadoc/hljs-theme.css b/src/main/javadoc/hljs-theme.css
index 75a4d088..b241e860 100644
--- a/src/main/javadoc/hljs-theme.css
+++ b/src/main/javadoc/hljs-theme.css
@@ -11,7 +11,7 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
background: #232323;
color: #e6e1dc;
/* added by us */
- border-radius:8px;
+ border-radius: 8px;
}
.hljs-comment,
@@ -105,4 +105,4 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
.hljs-link {
text-decoration: underline;
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java b/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java
index 1fb23ebd..e5ecce03 100644
--- a/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Character)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_Character_Test extends AbstractTest {
@@ -35,7 +36,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_Character_Test extends
@Test
@NeedReload
public void test_have_values_equal_to() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -51,7 +52,7 @@ public void test_have_values_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var16) values(5, 'X')");
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var16").hasValues('X');
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -73,7 +74,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -81,7 +82,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var16").hasValues('T');
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/DefaultDescription_Test.java b/src/test/java/org/assertj/db/api/DefaultDescription_Test.java
index 7aab2386..7e379320 100644
--- a/src/test/java/org/assertj/db/api/DefaultDescription_Test.java
+++ b/src/test/java/org/assertj/db/api/DefaultDescription_Test.java
@@ -12,27 +12,41 @@
*/
package org.assertj.db.api;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.db.api.Assertions.assertThat;
+
+import java.lang.reflect.Field;
+
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.common.NeedReload;
import org.assertj.db.global.AbstractElement;
+import org.assertj.db.type.AssertDbConnection;
+import org.assertj.db.type.AssertDbConnectionFactory;
import org.assertj.db.type.Changes;
import org.assertj.db.type.Request;
import org.assertj.db.type.Table;
+import org.junit.Before;
import org.junit.Test;
-import java.lang.reflect.Field;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.db.api.Assertions.assertThat;
-
/**
* Test on default descriptions.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class DefaultDescription_Test extends AbstractTest {
+ AssertDbConnection assertDbConnectionFromDs;
+
+ @Before
+ public void initAssertDbConnectionFromDs() {
+ if (assertDbConnectionFromDs != null) {
+ return;
+ }
+ assertDbConnectionFromDs = AssertDbConnectionFactory.of(this.dataSource).create();
+ }
+
/**
* This method tests the description of change with different information.
*/
@@ -43,11 +57,11 @@ public void test_default_description_for_change_with_different_information() thr
field.setAccessible(true);
- Table actorTable = new Table(dataSource, "actor");
- Request request = new Request(dataSource, "select * from actor");
- Changes changes = new Changes(dataSource).setStartPointNow();
- Changes changesOnActorTable = new Changes(actorTable).setStartPointNow();
- Changes changesOnRequest = new Changes(request).setStartPointNow();
+ Table actorTable = assertDbConnectionFromDs.table("actor").build();
+ Request request = assertDbConnectionFromDs.request("select * from actor").build();
+ Changes changes = assertDbConnectionFromDs.changes().build().setStartPointNow();
+ Changes changesOnActorTable = assertDbConnectionFromDs.changes().tables(actorTable).build().setStartPointNow();
+ Changes changesOnRequest = assertDbConnectionFromDs.changes().request(request).build().setStartPointNow();
updateChangesForTests();
update("delete from test2 where var1 = 1");
changes.setEndPointNow();
@@ -59,10 +73,10 @@ public void test_default_description_for_change_with_different_information() thr
WritableAssertionInfo infoOnActorTable = (WritableAssertionInfo) field.get(assertThat(changesOnActorTable).change());
WritableAssertionInfo infoOnTestTable = (WritableAssertionInfo) field.get(assertThat(changes).change(8));
WritableAssertionInfo infoOnRequest = (WritableAssertionInfo) field.get(assertThat(changesOnRequest).change());
- assertThat(info.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of a data source");
- assertThat(infoOnActorTable.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of a data source");
- assertThat(infoOnTestTable.descriptionText()).isEqualTo("Change at index 8 (on table : TEST2) of Changes on tables of a data source");
- assertThat(infoOnRequest.descriptionText()).isEqualTo("Change at index 0 of Changes on 'select * from actor' request of a data source");
+ assertThat(info.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'data source'");
+ assertThat(infoOnActorTable.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'data source'");
+ assertThat(infoOnTestTable.descriptionText()).isEqualTo("Change at index 8 (on table : TEST2) of Changes on tables of 'data source'");
+ assertThat(infoOnRequest.descriptionText()).isEqualTo("Change at index 0 of Changes on 'select * from actor' request of 'data source'");
}
/**
@@ -75,8 +89,8 @@ public void test_default_description_of_changes() throws Exception {
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -87,10 +101,10 @@ public void test_default_description_of_changes() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source'");
}
/**
@@ -103,8 +117,8 @@ public void test_default_description_of_all_changes() throws Exception {
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -115,10 +129,10 @@ public void test_default_description_of_all_changes() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source'");
}
/**
@@ -131,8 +145,8 @@ public void test_default_description_of_creation_changes() throws Exception {
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -143,10 +157,10 @@ public void test_default_description_of_creation_changes() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only creation changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only creation changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only creation changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only creation changes)");
}
/**
@@ -159,8 +173,8 @@ public void test_default_description_of_modification_changes() throws Exception
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -171,10 +185,10 @@ public void test_default_description_of_modification_changes() throws Exception
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only modification changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only modification changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only modification changes)");
}
/**
@@ -187,8 +201,8 @@ public void test_default_description_of_deletion_changes() throws Exception {
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -199,10 +213,10 @@ public void test_default_description_of_deletion_changes() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only deletion changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only deletion changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only deletion changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only deletion changes)");
}
/**
@@ -215,8 +229,8 @@ public void test_default_description_of_creation_on_table_changes() throws Excep
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -227,10 +241,10 @@ public void test_default_description_of_creation_on_table_changes() throws Excep
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only creation changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only creation changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only creation changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only creation changes on actor table)");
}
/**
@@ -243,8 +257,8 @@ public void test_default_description_of_modification_on_table_changes() throws E
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -255,10 +269,10 @@ public void test_default_description_of_modification_on_table_changes() throws E
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only modification changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only modification changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only modification changes on actor table)");
}
/**
@@ -271,8 +285,8 @@ public void test_default_description_of_deletion_on_table_changes() throws Excep
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -283,10 +297,10 @@ public void test_default_description_of_deletion_on_table_changes() throws Excep
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only deletion changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only deletion changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only deletion changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only deletion changes on actor table)");
}
/**
@@ -299,8 +313,8 @@ public void test_default_description_on_table_changes() throws Exception {
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -311,10 +325,10 @@ public void test_default_description_on_table_changes() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' source (only changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on tables of 'sa/jdbc:h2:mem:test' (only changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of a data source (only changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on tables of 'data source' (only changes on actor table)");
}
/**
@@ -327,10 +341,10 @@ public void test_default_description_of_changes_on_table() throws Exception {
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -341,10 +355,10 @@ public void test_default_description_of_changes_on_table() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on ACTOR table of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on ACTOR table of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on ACTOR table of 'data source'");
}
/**
@@ -357,10 +371,10 @@ public void test_default_description_of_changes_on_request() throws Exception {
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
- Changes changesFromSource = new Changes(requestFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(requestFromDataSource).setStartPointNow();
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
+ Changes changesFromSource = assertDbConnection.changes().request(requestFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().request(requestFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -371,10 +385,10 @@ public void test_default_description_of_changes_on_request() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on 'select * from actor' request of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Changes on 'select * from actor' request of 'data source'");
}
/**
@@ -387,8 +401,8 @@ public void test_default_description_of_change_of_changes() throws Exception {
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -399,10 +413,10 @@ public void test_default_description_of_change_of_changes() throws Exception {
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -415,10 +429,10 @@ public void test_default_description_of_change_of_changes_on_table() throws Exce
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -428,10 +442,10 @@ public void test_default_description_of_change_of_changes_on_table() throws Exce
ChangeAssert assertionFromDataSource = assertThat(changesFromDataSource).change(2);
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 2 (with primary key : [3]) of Changes on ACTOR table of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 2 (with primary key : [3]) of Changes on ACTOR table of 'data source'");
}
/**
@@ -444,10 +458,10 @@ public void test_default_description_of_change_of_changes_on_request() throws Ex
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select id, name, firstname, birth from actor where id = 1").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
- Changes changesFromSource = new Changes(requestFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(requestFromDataSource).setStartPointNow();
+ Request requestFromSource = assertDbConnection.request("select id, name, firstname, birth from actor where id = 1").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
+ Changes changesFromSource = assertDbConnection.changes().request(requestFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().request(requestFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -458,10 +472,10 @@ public void test_default_description_of_change_of_changes_on_request() throws Ex
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on 'select id, name, firstname, bi...' request of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on 'select id, name, firstname, bi...' request of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 2 (with primary key : [3]) of Changes on 'select * from actor' request of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 2 (with primary key : [3]) of Changes on 'select * from actor' request of 'data source'");
}
/**
@@ -474,8 +488,8 @@ public void test_default_description_of_creation_change_of_changes() throws Exce
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -486,10 +500,10 @@ public void test_default_description_of_creation_change_of_changes() throws Exce
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only creation changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only creation changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of a data source (only creation changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'data source' (only creation changes)");
}
/**
@@ -502,10 +516,10 @@ public void test_default_description_of_creation_change_of_changes_on_table() th
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -516,10 +530,10 @@ public void test_default_description_of_creation_change_of_changes_on_table() th
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only creation changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only creation changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of a data source (only creation changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'data source' (only creation changes)");
}
/**
@@ -532,10 +546,10 @@ public void test_default_description_of_creation_change_of_changes_on_request()
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
- Changes changesFromSource = new Changes(requestFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(requestFromDataSource).setStartPointNow();
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
+ Changes changesFromSource = assertDbConnection.changes().request(requestFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().request(requestFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -546,10 +560,10 @@ public void test_default_description_of_creation_change_of_changes_on_request()
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source (only creation changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' (only creation changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on 'select * from actor' request of a data source (only creation changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on 'select * from actor' request of 'data source' (only creation changes)");
}
/**
@@ -562,8 +576,8 @@ public void test_default_description_of_modification_change_of_changes() throws
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -574,10 +588,10 @@ public void test_default_description_of_modification_change_of_changes() throws
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only modification changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of a data source (only modification changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'data source' (only modification changes)");
}
/**
@@ -590,10 +604,10 @@ public void test_default_description_of_modification_change_of_changes_on_table(
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -604,10 +618,10 @@ public void test_default_description_of_modification_change_of_changes_on_table(
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only modification changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only modification changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of a data source (only modification changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of 'data source' (only modification changes)");
}
/**
@@ -620,10 +634,10 @@ public void test_default_description_of_modification_change_of_changes_on_reques
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
- Changes changesFromSource = new Changes(requestFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(requestFromDataSource).setStartPointNow();
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
+ Changes changesFromSource = assertDbConnection.changes().request(requestFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().request(requestFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -633,10 +647,10 @@ public void test_default_description_of_modification_change_of_changes_on_reques
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source (only modification changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' (only modification changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on 'select * from actor' request of a data source (only modification changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on 'select * from actor' request of 'data source' (only modification changes)");
}
/**
@@ -649,8 +663,8 @@ public void test_default_description_of_deletion_change_of_changes() throws Exce
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -661,10 +675,10 @@ public void test_default_description_of_deletion_change_of_changes() throws Exce
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only deletion changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only deletion changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of a data source (only deletion changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'data source' (only deletion changes)");
}
/**
@@ -677,10 +691,10 @@ public void test_default_description_of_deletion_change_of_changes_on_table() th
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -691,10 +705,10 @@ public void test_default_description_of_deletion_change_of_changes_on_table() th
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only deletion changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only deletion changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of a data source (only deletion changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of 'data source' (only deletion changes)");
}
/**
@@ -707,10 +721,10 @@ public void test_default_description_of_deletion_change_of_changes_on_request()
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
- Changes changesFromSource = new Changes(requestFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(requestFromDataSource).setStartPointNow();
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
+ Changes changesFromSource = assertDbConnection.changes().request(requestFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().request(requestFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -721,10 +735,10 @@ public void test_default_description_of_deletion_change_of_changes_on_request()
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source (only deletion changes)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' (only deletion changes)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on 'select * from actor' request of a data source (only deletion changes)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on 'select * from actor' request of 'data source' (only deletion changes)");
}
/**
@@ -737,8 +751,8 @@ public void test_default_description_of_creation_change_on_table_of_changes() th
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -749,10 +763,10 @@ public void test_default_description_of_creation_change_on_table_of_changes() th
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only creation changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only creation changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of a data source (only creation changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'data source' (only creation changes on actor table)");
}
/**
@@ -765,10 +779,10 @@ public void test_default_description_of_creation_change_on_table_of_changes_on_t
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -779,10 +793,10 @@ public void test_default_description_of_creation_change_on_table_of_changes_on_t
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only creation changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only creation changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of a data source (only creation changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'data source' (only creation changes on actor table)");
}
/**
@@ -795,8 +809,8 @@ public void test_default_description_of_modification_change_on_table_of_changes(
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -807,10 +821,10 @@ public void test_default_description_of_modification_change_on_table_of_changes(
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only modification changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of a data source (only modification changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'data source' (only modification changes on actor table)");
}
/**
@@ -823,10 +837,10 @@ public void test_default_description_of_modification_change_on_table_of_changes_
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -837,10 +851,10 @@ public void test_default_description_of_modification_change_on_table_of_changes_
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only modification changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only modification changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of a data source (only modification changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [1]) of Changes on ACTOR table of 'data source' (only modification changes on actor table)");
}
/**
@@ -853,8 +867,8 @@ public void test_default_description_of_deletion_change_on_table_of_changes() th
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -865,10 +879,10 @@ public void test_default_description_of_deletion_change_on_table_of_changes() th
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only deletion changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only deletion changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of a data source (only deletion changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'data source' (only deletion changes on actor table)");
}
/**
@@ -881,10 +895,10 @@ public void test_default_description_of_deletion_change_on_table_of_changes_on_t
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -895,10 +909,10 @@ public void test_default_description_of_deletion_change_on_table_of_changes_on_t
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only deletion changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only deletion changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of a data source (only deletion changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [3]) of Changes on ACTOR table of 'data source' (only deletion changes on actor table)");
}
/**
@@ -911,8 +925,8 @@ public void test_default_description_of_change_on_table_of_changes() throws Exce
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -922,10 +936,10 @@ public void test_default_description_of_change_on_table_of_changes() throws Exce
ChangeAssert assertionFromDataSource = assertThat(changesFromDataSource).changeOnTable("actor", 0);
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of a data source (only changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'data source' (only changes on actor table)");
}
/**
@@ -938,10 +952,10 @@ public void test_default_description_of_change_on_table_of_changes_on_table() th
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -952,10 +966,10 @@ public void test_default_description_of_change_on_table_of_changes_on_table() th
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of a data source (only changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'data source' (only changes on actor table)");
}
/**
@@ -968,8 +982,8 @@ public void test_default_description_of_change_on_table_with_pks_of_changes() th
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -980,10 +994,10 @@ public void test_default_description_of_change_on_table_with_pks_of_changes() th
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 1 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 1 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' (only changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 1 (on table : ACTOR and with primary key : [1]) of Changes on tables of a data source (only changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 1 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'data source' (only changes on actor table)");
}
/**
@@ -996,10 +1010,10 @@ public void test_default_description_of_change_on_table_with_pks_of_changes_on_t
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
- Changes changesFromSource = new Changes(tableFromSource).setStartPointNow();
- Changes changesFromDataSource = new Changes(tableFromDataSource).setStartPointNow();
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
+ Changes changesFromSource = assertDbConnection.changes().tables(tableFromSource).build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().tables(tableFromDataSource).build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1010,10 +1024,10 @@ public void test_default_description_of_change_on_table_with_pks_of_changes_on_t
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 1 (with primary key : [1]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source (only changes on actor table)");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Change at index 1 (with primary key : [1]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' (only changes on actor table)");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 1 (with primary key : [1]) of Changes on ACTOR table of a data source (only changes on actor table)");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Change at index 1 (with primary key : [1]) of Changes on ACTOR table of 'data source' (only changes on actor table)");
}
/**
@@ -1026,8 +1040,8 @@ public void test_default_description_column_of_change_of_changes() throws Except
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1038,10 +1052,10 @@ public void test_default_description_column_of_change_of_changes() throws Except
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Column at index 0 (column name : ID) of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Column at index 0 (column name : ID) of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -1054,8 +1068,8 @@ public void test_default_description_row_at_start_point_of_change_of_changes() t
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1066,10 +1080,10 @@ public void test_default_description_row_at_start_point_of_change_of_changes() t
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Row at start point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Row at start point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Row at start point of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Row at start point of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -1082,8 +1096,8 @@ public void test_default_description_row_at_end_point_of_change_of_changes() thr
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1094,10 +1108,10 @@ public void test_default_description_row_at_end_point_of_change_of_changes() thr
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Row at end point of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Row at end point of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -1110,8 +1124,8 @@ public void test_default_description_value_at_start_point_of_column_of_change_of
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1123,10 +1137,10 @@ public void test_default_description_value_at_start_point_of_column_of_change_of
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Value at start point of Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Value at start point of Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at start point of Column at index 0 (column name : ID) of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at start point of Column at index 0 (column name : ID) of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -1139,8 +1153,8 @@ public void test_default_description_value_at_end_point_of_column_of_change_of_c
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1152,10 +1166,10 @@ public void test_default_description_value_at_end_point_of_column_of_change_of_c
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Value at end point of Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Value at end point of Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at end point of Column at index 0 (column name : ID) of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at end point of Column at index 0 (column name : ID) of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -1168,8 +1182,8 @@ public void test_default_description_value_of_row_at_start_point_of_change_of_ch
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1180,10 +1194,10 @@ public void test_default_description_value_of_row_at_start_point_of_change_of_ch
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at start point of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at start point of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at start point of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at start point of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'data source'");
}
/**
@@ -1196,8 +1210,8 @@ public void test_default_description_value_of_row_at_end_point_of_change_of_chan
field.setAccessible(true);
- Changes changesFromSource = new Changes(source).setStartPointNow();
- Changes changesFromDataSource = new Changes(dataSource).setStartPointNow();
+ Changes changesFromSource = assertDbConnection.changes().build().setStartPointNow();
+ Changes changesFromDataSource = assertDbConnectionFromDs.changes().build().setStartPointNow();
updateChangesForTests();
changesFromSource.setEndPointNow();
changesFromDataSource.setEndPointNow();
@@ -1208,10 +1222,10 @@ public void test_default_description_value_of_row_at_end_point_of_change_of_chan
WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource);
- assertThat(infoFromSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source");
+ assertThat(infoFromSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'");
WritableAssertionInfo infoFromDataSource = (WritableAssertionInfo) field.get(assertionFromDataSource);
- assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at end point of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of a data source");
+ assertThat(infoFromDataSource.descriptionText()).isEqualTo("Value at index 0 (column name : ID) of Row at end point of Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'data source'");
}
/**
@@ -1223,8 +1237,8 @@ public void test_default_description_of_table() throws Exception {
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
TableAssert assertionFromSource = assertThat(tableFromSource);
@@ -1247,8 +1261,8 @@ public void test_default_description_of_request() throws Exception {
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select id, name, firstname, birth from actor where id = 1").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
+ Request requestFromSource = assertDbConnection.request("select id, name, firstname, birth from actor where id = 1").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
RequestAssert assertionFromSource = assertThat(requestFromSource);
@@ -1271,8 +1285,8 @@ public void test_default_description_of_column_of_table() throws Exception {
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
TableColumnAssert assertionFromSource = assertThat(tableFromSource).column();
@@ -1295,8 +1309,8 @@ public void test_default_description_of_row_of_table() throws Exception {
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
TableRowAssert assertionFromSource = assertThat(tableFromSource).row();
@@ -1319,8 +1333,8 @@ public void test_default_description_of_column_of_request() throws Exception {
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
RequestColumnAssert assertionFromSource = assertThat(requestFromSource).column();
@@ -1343,8 +1357,8 @@ public void test_default_description_of_row_of_request() throws Exception {
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
RequestRowAssert assertionFromSource = assertThat(requestFromSource).row();
@@ -1367,8 +1381,8 @@ public void test_default_description_of_value_of_column_of_table() throws Except
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
TableColumnValueAssert assertionFromSource = assertThat(tableFromSource).column().value();
@@ -1391,8 +1405,8 @@ public void test_default_description_of_value_of_row_of_table() throws Exception
field.setAccessible(true);
- Table tableFromSource = new Table(source, "actor");
- Table tableFromDataSource = new Table(dataSource, "actor");
+ Table tableFromSource = assertDbConnection.table("actor").build();
+ Table tableFromDataSource = assertDbConnectionFromDs.table("actor").build();
TableRowValueAssert assertionFromSource = assertThat(tableFromSource).row().value();
@@ -1415,8 +1429,8 @@ public void test_default_description_of_value_of_column_of_request() throws Exce
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
RequestColumnValueAssert assertionFromSource = assertThat(requestFromSource).column().value();
@@ -1439,8 +1453,8 @@ public void test_default_description_of_value_of_row_of_request() throws Excepti
field.setAccessible(true);
- Request requestFromSource = new Request(source, "select * from actor").setPksName("ID");
- Request requestFromDataSource = new Request(dataSource, "select * from actor").setPksName("ID");
+ Request requestFromSource = assertDbConnection.request("select * from actor").pksName("ID").build();
+ Request requestFromDataSource = assertDbConnectionFromDs.request("select * from actor").pksName("ID").build();
RequestRowValueAssert assertionFromSource = assertThat(requestFromSource).row().value();
diff --git a/src/test/java/org/assertj/db/api/Descriptable_Test.java b/src/test/java/org/assertj/db/api/Descriptable_Test.java
index b0484cfd..522fe6b0 100644
--- a/src/test/java/org/assertj/db/api/Descriptable_Test.java
+++ b/src/test/java/org/assertj/db/api/Descriptable_Test.java
@@ -29,6 +29,7 @@
* Test on {@code Descriptable} interface methods.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class Descriptable_Test extends AbstractTest {
@@ -39,7 +40,7 @@ public class Descriptable_Test extends AbstractTest {
public void test_as() throws Exception {
Field field = AbstractElement.class.getDeclaredField("info");
field.setAccessible(true);
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableRowAssert assertion = assertThat(table).row();
WritableAssertionInfo info1 = (WritableAssertionInfo) field.get(assertion);
diff --git a/src/test/java/org/assertj/db/api/SoftAssertions_Test.java b/src/test/java/org/assertj/db/api/SoftAssertions_Test.java
index 5c64be6d..499e4e49 100644
--- a/src/test/java/org/assertj/db/api/SoftAssertions_Test.java
+++ b/src/test/java/org/assertj/db/api/SoftAssertions_Test.java
@@ -12,6 +12,9 @@
*/
package org.assertj.db.api;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
import org.assertj.core.api.SoftAssertionError;
import org.assertj.core.api.ThrowableAssert;
import org.assertj.db.common.AbstractTest;
@@ -21,9 +24,6 @@
import org.assertj.db.type.Table;
import org.junit.Test;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
/**
* Test on the utility class {@code SoftAssertions}.
*
@@ -37,7 +37,7 @@ public class SoftAssertions_Test extends AbstractTest {
@Test
@NeedReload
public void test_soft_assert_table() {
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
final SoftAssertions softly = new SoftAssertions();
softly.assertThat(table).as("Show be Zero").column("var1").value().isEqualTo(0);
softly.assertThat(table).column("var2").value().isFalse();
@@ -67,7 +67,7 @@ public void call() {
@Test
@NeedReload
public void test_soft_assert_request() {
- Request request = new Request(source, "select * from test");
+ Request request = assertDbConnection.request("select * from test").build();
final SoftAssertions softly = new SoftAssertions();
softly.assertThat(request).column("var1").value(0).isEqualTo(0);
softly.assertThat(request).column("var2").value(0).isFalse();
@@ -97,7 +97,7 @@ public void call() {
@Test
@NeedReload
public void test_soft_assert_changes() {
- Changes changes = new Changes(source);
+ Changes changes = assertDbConnection.changes().build();
changes.setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java
index b75fc10e..21d19734 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java
@@ -27,6 +27,7 @@
* {@link AssertOnChangeType#isCreation()}} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnChangeType_IsCreation_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnChangeType_IsCreation_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_creation() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_is_creation() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_is_creation() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_type_of_change_is_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_type_of_change_is_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_type_of_change_is_different() throws Exception {
assertThat(changes).change(3).isCreation();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be of type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java
index 7af6e086..21228271 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java
@@ -27,6 +27,7 @@
* {@link AssertOnChangeType#isDeletion()}} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnChangeType_IsDeletion_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnChangeType_IsDeletion_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_deletion() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_is_deletion() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_is_deletion() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_type_of_change_is_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_type_of_change_is_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_type_of_change_is_different() throws Exception {
assertThat(changes).change(3).isDeletion();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be of type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java
index c5bd83fb..f5265f14 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java
@@ -27,6 +27,7 @@
* {@link AssertOnChangeType#isModification()}} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnChangeType_IsModification_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnChangeType_IsModification_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_modification() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_is_modification() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_is_modification() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_type_of_change_is_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_type_of_change_is_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_type_of_change_is_different() throws Exception {
assertThat(changes).change().isModification();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be of type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java
index 4dce3796..f13f7638 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java
@@ -28,6 +28,7 @@
* {@link AssertOnChangeType#isOfType(org.assertj.db.type.ChangeType)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnChangeType_IsOfType_Test extends AbstractTest {
@@ -36,8 +37,8 @@ public class AssertOnChangeType_IsOfType_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_of_type() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_is_of_type() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -51,8 +52,8 @@ public void test_is_of_type() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_type_of_change_is_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_type_of_change_is_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -60,7 +61,7 @@ public void should_fail_because_type_of_change_is_different() throws Exception {
assertThat(changes).change(3).isOfType(ChangeType.CREATION);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be of type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java
index 0c9f1d90..eda9b04a 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java
@@ -29,6 +29,7 @@
* {@link AssertOnColumnClass#isOfClass(Class, boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnClass_IsOfClass_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnClass_IsOfClass_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_of_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var2");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isOfClass(Boolean.class, true);
@@ -65,18 +66,18 @@ public void test_is_of_type() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var2").isOfClass(Boolean.class, false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of class%n"
@@ -86,7 +87,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isOfClass(Boolean.class, true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of class%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java
index 9382938a..c6e4c495 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java
@@ -26,6 +26,7 @@
* {@link AssertOnColumnContent#containsValues(Boolean...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_Boolean_Test extends AbstractTest {
@@ -33,13 +34,13 @@ public class AssertOnColumnContent_ContainsValues_Boolean_Test extends AbstractT
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var2");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(true, false, false, false);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(true, null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -49,8 +50,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var2");
try {
tableColumnAssert.containsValues(true, false, true, false);
@@ -63,7 +64,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " <[true, false, true, false]>%n"
+ " (parameter at index 2 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2");
try {
tableColumnAssert2.containsValues(true, true);
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java
index ce578d1f..357f0030 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java
@@ -27,6 +27,7 @@
* {@link AssertOnColumnContent#containsValues(byte[]...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_Bytes_Test extends AbstractTest {
@@ -34,16 +35,16 @@ public class AssertOnColumnContent_ContainsValues_Bytes_Test extends AbstractTes
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
+ public void test_has_values() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
byte[] bytesDev = bytesContentFromClassPathOf("logo-dev.jpg");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var11");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(bytesH2, bytesDev, bytesDev, bytesDev);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var11");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(bytesH2, null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -53,10 +54,10 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
+ public void should_fail_because_values_are_different() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var11");
try {
tableColumnAssert.containsValues(bytesH2, bytesH2, bytesH2, bytesH2);
@@ -67,7 +68,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " (parameter at index 1 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var11");
try {
tableColumnAssert2.containsValues(bytesH2, bytesH2);
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java
index 7144dfd4..6dae1114 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java
@@ -26,6 +26,7 @@
* {@link AssertOnColumnContent#containsValues(Character...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_Character_Test extends AbstractTest {
@@ -33,13 +34,13 @@ public class AssertOnColumnContent_ContainsValues_Character_Test extends Abstrac
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var16");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues('T', 'e', 's', 't');
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var17");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(null, 'T');
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -49,8 +50,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var16");
try {
tableColumnAssert.containsValues('t', 'e', 's', 't');
@@ -63,7 +64,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " <['t', 'e', 's', 't']>%n"
+ " (parameter <'t'> at index 3 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var17");
try {
tableColumnAssert2.containsValues('T', 'T');
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java
index d0cd0dc5..ae4c5e35 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java
@@ -29,6 +29,7 @@
* {@link AssertOnColumnContent#containsValues(org.assertj.db.type.DateTimeValue...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_DateTimeValue_Test extends AbstractTest {
@@ -36,8 +37,8 @@ public class AssertOnColumnContent_ContainsValues_DateTimeValue_Test extends Abs
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var10");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
@@ -46,7 +47,7 @@ public void test_has_values() throws Exception {
DateTimeValue.of(DateValue.of(2014, 5, 30)));
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
@@ -72,8 +73,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var10");
try {
tableColumnAssert.containsValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
@@ -95,7 +96,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " 2014-05-30T00:00:00.000000000]>%n"
+ " (parameter <2014-05-30T13:29:49.000000000> at index 1 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10");
try {
tableColumnAssert2.containsValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java
index b75ecddd..c2a0d2e5 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java
@@ -28,6 +28,7 @@
* {@link AssertOnColumnContent#containsValues(org.assertj.db.type.DateValue...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_DateValue_Test extends AbstractTest {
@@ -36,9 +37,9 @@ public class AssertOnColumnContent_ContainsValues_DateValue_Test extends Abstrac
*/
@Test
@NeedReload
- public void test_has_values() throws Exception {
+ public void test_has_values() {
update("update test2 set var10 = '2014-05-24' where var1 = 1");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var9");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(
DateValue.of(2014, 5, 24),
@@ -47,7 +48,7 @@ public void test_has_values() throws Exception {
DateValue.of(2014, 5, 30));
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(DateValue.of(2014, 5, 24),
null);
@@ -62,8 +63,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var9");
try {
tableColumnAssert.containsValues(DateValue.of(2014, 5, 24),
@@ -82,7 +83,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " <[2014-05-24, 2014-05-29, 2014-05-30, 2014-05-30]>%n"
+ " (parameter <2014-05-29> at index 1 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9");
try {
tableColumnAssert2.containsValues(DateValue.of(2014, 5, 24),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java
index e3b6d3cb..267e0c27 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java
@@ -26,6 +26,7 @@
* {@link AssertOnColumnContent#containsValues(Number...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_Number_Test extends AbstractTest {
@@ -33,13 +34,13 @@ public class AssertOnColumnContent_ContainsValues_Number_Test extends AbstractTe
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(2, 20, 25, 0);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(2, null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -97,8 +98,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
try {
tableColumnAssert.containsValues(2, 20, 35, 0);
@@ -111,7 +112,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " <[2, 20, 35, 0]>%n"
+ " (parameter <35> at index 2 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
try {
tableColumnAssert2.containsValues(2, 2);
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java
index 3ac469c7..63f94e17 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java
@@ -27,6 +27,7 @@
* {@link AssertOnColumnContent#containsValues(String...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_ContainsValues_String_Test extends AbstractTest {
@@ -35,13 +36,13 @@ public class AssertOnColumnContent_ContainsValues_String_Test extends AbstractTe
*/
@Test
@NeedReload
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues("2", "20", "25", "0");
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues("2", null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -154,7 +155,7 @@ public void test_has_values() throws Exception {
Assertions.assertThat(tableColumnAssert18).isSameAs(tableColumnAssertReturn18);
update("update test2 set var10 = '2014-05-24' where var1 = 1");
- table2 = new Table(source, "test2");
+ table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert19 = assertThat(table2).column("var10");
TableColumnAssert tableColumnAssertReturn19 = tableColumnAssert19.containsValues("2014-05-24",
null);
@@ -171,8 +172,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
try {
tableColumnAssert.containsValues("2", "20", "35", "0");
@@ -185,7 +186,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " <[\"2\", \"20\", \"35\", \"0\"]>%n"
+ " (parameter <\"35\"> at index 2 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
try {
tableColumnAssert2.containsValues("2", "2");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java
index 99f7336a..94570202 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java
@@ -27,6 +27,7 @@
* {@link AssertOnColumnContent#containsValues(org.assertj.db.type.TimeValue...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnContent_HasValues_TimeValue_Test extends AbstractTest {
@@ -34,8 +35,8 @@ public class AssertOnColumnContent_HasValues_TimeValue_Test extends AbstractTest
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var8");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(TimeValue.of(9, 46, 30),
TimeValue.of(12, 29, 49),
@@ -43,7 +44,7 @@ public void test_has_values() throws Exception {
TimeValue.of(12, 29, 49));
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var8");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(TimeValue.of(9, 46, 30), null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -53,8 +54,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var8");
try {
tableColumnAssert.containsValues(TimeValue.of(12, 29, 49),
@@ -76,7 +77,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "12:29:49.000000000]>%n"
+ " (parameter <12:29:49.000000000> at index 3 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var8");
try {
tableColumnAssert2.containsValues(TimeValue.of(9, 46, 30),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java
index b1d87aeb..d7f75fe2 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java
@@ -35,8 +35,8 @@ public class AssertOnColumnContent_HasValues_UUID_Test extends AbstractTest {
* This method tests the {@code containsValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var15");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(
UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"),
@@ -46,7 +46,7 @@ public void test_has_values() throws Exception {
);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2
.containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), null);
@@ -57,8 +57,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var15");
try {
tableColumnAssert.containsValues(UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"),
@@ -81,7 +81,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ " f96ec595-ce91-47cc-9152-ccc8ac48aad6]>%n"
+ " (parameter at index 0 is not found)"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16");
try {
tableColumnAssert2.containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java
index ee0a4c2b..9320401c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(Boolean...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_Boolean_Test extends AbstractTest {
@@ -33,13 +34,13 @@ public class AssertOnColumnEquality_HasValues_Boolean_Test extends AbstractTest
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var2");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(true, false, false, false);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(true, null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -49,8 +50,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var2");
try {
tableColumnAssert.hasValues(true, false, true, false);
@@ -62,7 +63,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " "));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2");
try {
tableColumnAssert2.hasValues(true, true);
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java
index dbc74e51..56103f82 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(byte[]...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_Bytes_Test extends AbstractTest {
@@ -34,16 +35,16 @@ public class AssertOnColumnEquality_HasValues_Bytes_Test extends AbstractTest {
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
+ public void test_has_values() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
byte[] bytesDev = bytesContentFromClassPathOf("logo-dev.jpg");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var11");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(bytesH2, bytesDev, bytesDev, bytesDev);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var11");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(bytesH2, null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -53,10 +54,10 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
+ public void should_fail_because_values_are_different() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var11");
try {
tableColumnAssert.hasValues(bytesH2, bytesH2, bytesH2, bytesH2);
@@ -66,7 +67,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "Expecting that the value at index 1 to be equal to the expected value but was not equal"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var11");
try {
tableColumnAssert2.hasValues(bytesH2, bytesH2);
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java
index 5e0ddc2d..6b4cd512 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(Character...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_Character_Test extends AbstractTest {
@@ -33,13 +34,13 @@ public class AssertOnColumnEquality_HasValues_Character_Test extends AbstractTes
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var16");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues('T', 'e', 's', 't');
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var17");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues('T', null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -49,8 +50,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var16");
try {
tableColumnAssert.hasValues('t', 'e', 's', 'T');
@@ -62,7 +63,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " <'t'>"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var17");
try {
tableColumnAssert2.hasValues('T', 'T');
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java
index 5b5d454e..c7ebe5fe 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(org.assertj.db.type.DateTimeValue...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_DateTimeValue_Test extends AbstractTest {
@@ -36,8 +37,8 @@ public class AssertOnColumnEquality_HasValues_DateTimeValue_Test extends Abstrac
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var10");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
@@ -46,7 +47,7 @@ public void test_has_values() throws Exception {
DateTimeValue.of(DateValue.of(2014, 5, 30)));
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
@@ -72,8 +73,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var10");
try {
tableColumnAssert.hasValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
@@ -88,7 +89,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " <2014-05-30T13:29:49.000000000>"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10");
try {
tableColumnAssert2.hasValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java
index a25c480c..f55774e4 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(org.assertj.db.type.DateValue...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_DateValue_Test extends AbstractTest {
@@ -36,9 +37,9 @@ public class AssertOnColumnEquality_HasValues_DateValue_Test extends AbstractTes
*/
@Test
@NeedReload
- public void test_has_values() throws Exception {
+ public void test_has_values() {
update("update test2 set var10 = '2014-05-24' where var1 = 1");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var9");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(
DateValue.of(2014, 5, 24),
@@ -47,7 +48,7 @@ public void test_has_values() throws Exception {
DateValue.of(2014, 5, 30));
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(DateValue.of(2014, 5, 24),
null);
@@ -62,8 +63,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var9");
try {
tableColumnAssert.hasValues(DateValue.of(2014, 5, 24),
@@ -78,7 +79,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " <2014-05-29>"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9");
try {
tableColumnAssert2.hasValues(DateValue.of(2014, 5, 24),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java
index ca13e0f5..b6679c80 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(Number...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_Number_Test extends AbstractTest {
@@ -33,13 +34,13 @@ public class AssertOnColumnEquality_HasValues_Number_Test extends AbstractTest {
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(2, 20, 25, 0);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(2, null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -97,8 +98,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
try {
tableColumnAssert.hasValues(2, 20, 35, 0);
@@ -110,7 +111,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " <35>"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
try {
tableColumnAssert2.hasValues(2, 2);
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java
index 2829f3ba..37936dd8 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(String...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_String_Test extends AbstractTest {
@@ -35,13 +36,13 @@ public class AssertOnColumnEquality_HasValues_String_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues("2", "20", "25", "0");
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues("2", null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -154,7 +155,7 @@ public void test_has_values() throws Exception {
Assertions.assertThat(tableColumnAssert18).isSameAs(tableColumnAssertReturn18);
update("update test2 set var10 = '2014-05-24' where var1 = 1");
- table2 = new Table(source, "test2");
+ table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert19 = assertThat(table2).column("var10");
TableColumnAssert tableColumnAssertReturn19 = tableColumnAssert19.hasValues("2014-05-24",
null);
@@ -170,8 +171,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var3");
try {
tableColumnAssert.hasValues("2", "20", "35", "0");
@@ -183,7 +184,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " <\"35\">"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3");
try {
tableColumnAssert2.hasValues("2", "2");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java
index 16bdbf15..7ba0be60 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(org.assertj.db.type.TimeValue...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnEquality_HasValues_TimeValue_Test extends AbstractTest {
@@ -34,8 +35,8 @@ public class AssertOnColumnEquality_HasValues_TimeValue_Test extends AbstractTes
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var8");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(TimeValue.of(9, 46, 30),
TimeValue.of(12, 29, 49),
@@ -43,7 +44,7 @@ public void test_has_values() throws Exception {
TimeValue.of(12, 29, 49));
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var8");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(TimeValue.of(9, 46, 30), null);
Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2);
@@ -53,8 +54,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var8");
try {
tableColumnAssert.hasValues(TimeValue.of(12, 29, 49),
@@ -69,7 +70,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " <12:29:49.000000000>"));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var8");
try {
tableColumnAssert2.hasValues(TimeValue.of(9, 46, 30),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java
index d69796ff..971d1e5c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java
@@ -35,8 +35,8 @@ public class AssertOnColumnEquality_HasValues_UUID_Test extends AbstractTest {
* This method tests the {@code hasValues} assertion method.
*/
@Test
- public void test_has_values() throws Exception {
- Table table = new Table(source, "test");
+ public void test_has_values() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var15");
TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(
UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"),
@@ -46,7 +46,7 @@ public void test_has_values() throws Exception {
);
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn);
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16");
TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2
.hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), null);
@@ -57,8 +57,8 @@ public void test_has_values() throws Exception {
* This method should fail because the values are different.
*/
@Test
- public void should_fail_because_values_are_different() throws Exception {
- Table table = new Table(source, "test");
+ public void should_fail_because_values_are_different() {
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var15");
try {
tableColumnAssert.hasValues(UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"),
@@ -74,7 +74,7 @@ public void should_fail_because_values_are_different() throws Exception {
+ "to be equal to: %n"
+ " "));
}
- Table table2 = new Table(source, "test2");
+ Table table2 = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16");
try {
tableColumnAssert2.hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"),
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java
index 4ca2e35b..855c4b98 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java
@@ -33,6 +33,7 @@
* {@link AssertOnColumnName#hasColumnName(String)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnName_HasColumnName_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnColumnName_HasColumnName_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_has_column_name() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_column_name() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -54,7 +55,7 @@ public void test_has_column_name() throws Exception {
ChangeRowValueAssert changeRowValueAssert2 = changeRowValueAssert.hasColumnName("id");
Assertions.assertThat(changeRowValueAssert).isSameAs(changeRowValueAssert2);
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
TableColumnAssert tableColumnAssert = tableAssert.column();
TableColumnAssert tableColumnAssert2 = tableColumnAssert.hasColumnName("id");
@@ -69,8 +70,8 @@ public void test_has_column_name() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_column_name_is_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_column_name_is_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -79,7 +80,7 @@ public void should_fail_because_column_name_is_different() throws Exception {
changeAssert.column().hasColumnName("ID2");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " \"ID2\"%n"
+ "to be the name of the column but was:%n"
@@ -89,14 +90,14 @@ public void should_fail_because_column_name_is_different() throws Exception {
changeAssert.rowAtEndPoint().value().hasColumnName("ID2");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " \"ID2\"%n"
+ "to be the name of the column but was:%n"
+ " \"ID\""));
}
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
try {
tableAssert.column().hasColumnName("ID2");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java
index b56dc5bb..1a8c11a0 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnNullity#hasOnlyNotNullValues()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnNullity_HasOnlyNotNullValues_Test extends AbstractTest {
@@ -34,7 +35,7 @@ public class AssertOnColumnNullity_HasOnlyNotNullValues_Test extends AbstractTes
*/
@Test
public void test_has_only_not_null_values() {
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var14");
TableColumnAssert tableColumnAssert2 = tableColumnAssert.hasOnlyNotNullValues();
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssert2);
@@ -44,8 +45,8 @@ public void test_has_only_not_null_values() {
* This method should fail because the column has a null value.
*/
@Test
- public void should_fail_because_column_has_null_value() throws Exception {
- Table table = new Table(source, "test2");
+ public void should_fail_because_column_has_null_value() {
+ Table table = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var14");
try {
tableColumnAssert.hasOnlyNotNullValues();
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java
index a5df95af..710b8709 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnNullity#hasOnlyNullValues()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnNullity_HasOnlyNullValues_Test extends AbstractTest {
@@ -34,7 +35,7 @@ public class AssertOnColumnNullity_HasOnlyNullValues_Test extends AbstractTest {
*/
@Test
public void test_has_only_null_values() {
- Table table = new Table(source, "test2");
+ Table table = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var15");
TableColumnAssert tableColumnAssert2 = tableColumnAssert.hasOnlyNullValues();
Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssert2);
@@ -44,8 +45,8 @@ public void test_has_only_null_values() {
* This method should fail because the column has a not null value.
*/
@Test
- public void should_fail_because_column_has_not_null_value() throws Exception {
- Table table = new Table(source, "test2");
+ public void should_fail_because_column_has_not_null_value() {
+ Table table = assertDbConnection.table("test2").build();
TableColumnAssert tableColumnAssert = assertThat(table).column("var14");
try {
tableColumnAssert.hasOnlyNullValues();
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java
index e501d5e3..426ca34b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test extends A
@Test
@NeedReload
public void test_have_values_equal_to() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -53,7 +54,7 @@ public void test_have_values_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var2) values(5, true)");
changes.setEndPointNow();
@@ -61,7 +62,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var2").hasValues(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -75,7 +76,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -83,7 +84,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var2").hasValues(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java
index d8d8ea74..6d5f83d4 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(byte[])} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test extends AbstractTest {
@@ -40,7 +41,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test extends Abs
public void test_have_values_equal_to() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,7 +59,7 @@ public void test_have_values_equal_to() {
public void should_fail_because_value_at_start_point_is_different() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var11) values(5, FILE_READ('classpath:h2-logo-2.png'))");
changes.setEndPointNow();
@@ -66,7 +67,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var11").hasValues(bytesH2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point to be equal to the expected value but was not equal"));
}
}
@@ -79,7 +80,7 @@ public void should_fail_because_value_at_start_point_is_different() {
public void should_fail_because_value_at_end_point_is_different() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -87,7 +88,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var11").hasValues(bytesH2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point to be equal to the expected value but was not equal"));
}
}
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java
index dc0b14c9..c50bcddd 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java
@@ -31,6 +31,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test extends AbstractTest {
@@ -40,7 +41,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test ext
@Test
@NeedReload
public void test_have_values_equal_to() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -57,7 +58,7 @@ public void test_have_values_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var10) values(5, '2014-05-24 09:46:30')");
changes.setEndPointNow();
@@ -66,7 +67,7 @@ public void should_fail_because_value_at_start_point_is_different() {
DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -80,7 +81,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -89,7 +90,7 @@ public void should_fail_because_value_at_end_point_is_different() {
DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java
index b8e868db..2eb881d1 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test extends AbstractTest {
@@ -38,7 +39,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test extends
@Test
@NeedReload
public void test_have_values_equal_to() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -54,7 +55,7 @@ public void test_have_values_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var9) values(5, '2014-05-24')");
changes.setEndPointNow();
@@ -62,7 +63,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var9").hasValues(DateValue.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -76,7 +77,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -84,7 +85,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var9").hasValues(DateValue.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java
index 30dd2f4d..cfeee156 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_Number_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_Number_Test extends Ab
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -53,7 +54,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var3) values(5, 3)");
changes.setEndPointNow();
@@ -61,7 +62,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var3").hasValues(3);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -75,7 +76,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -83,7 +84,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var3").hasValues(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java
index 8a559f5d..9f129311 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(String)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_String_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_String_Test extends Ab
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -56,7 +57,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var12, var15) values(5, 'test', '88838129-291E-40A9-A94C-A15BE36CF7C3')");
changes.setEndPointNow();
@@ -64,7 +65,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var12").hasValues("test");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -74,7 +75,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var15").hasValues("88838129-291E-40A9-A94C-A15BE36CF7C3");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -96,7 +97,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var12").hasValues("text");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -106,7 +107,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var15").hasValues("30B443AE-C0C9-4790-9BEC-CE1380808435");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java
index 9a9410f4..893452e9 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test extends AbstractTest {
@@ -38,7 +39,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test extends
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -54,7 +55,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var8) values(5, '09:46:30')");
changes.setEndPointNow();
@@ -62,7 +63,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var8").hasValues(TimeValue.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -76,7 +77,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -84,7 +85,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var8").hasValues(TimeValue.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java
index f032a2c9..ec3eac4b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java
@@ -39,7 +39,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test extends Abst
@Test
@NeedReload
public void test_have_values_equal_to() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -56,7 +56,7 @@ public void test_have_values_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var15) values(5, 'F96EC595-CE91-47CC-9152-CCC8AC48AAD6')");
changes.setEndPointNow();
@@ -65,7 +65,7 @@ public void should_fail_because_value_at_start_point_is_different() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -79,7 +79,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -88,7 +88,7 @@ public void should_fail_because_value_at_end_point_is_different() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java
index 5842676e..b9a16835 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Boolean, Boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test extends A
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -53,7 +54,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var2) values(5, true)");
changes.setEndPointNow();
@@ -61,7 +62,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var2").hasValues(true, true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -75,7 +76,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -83,7 +84,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var2").hasValues(true, true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java
index 6c94a8fa..f4a6fefb 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(byte[], byte[])} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test extends AbstractTest {
@@ -40,7 +41,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test extends Abs
public void test_has_values() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,7 +59,7 @@ public void test_has_values() {
public void should_fail_because_value_at_start_point_is_different() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var11) values(5, FILE_READ('classpath:h2-logo-2.png'))");
changes.setEndPointNow();
@@ -66,7 +67,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var11").hasValues(bytesH2, bytesH2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point to be equal to the expected value but was not equal"));
}
}
@@ -79,7 +80,7 @@ public void should_fail_because_value_at_start_point_is_different() {
public void should_fail_because_value_at_end_point_is_different() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -87,7 +88,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var11").hasValues(bytesH2, bytesH2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point to be equal to the expected value but was not equal"));
}
}
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java
index 85e1623e..5d46d5e8 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Character, Character)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test extends
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -53,7 +54,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var2) values(5, true)");
changes.setEndPointNow();
@@ -61,7 +62,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var16").hasValues('T', 'T');
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -75,7 +76,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -83,7 +84,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var16").hasValues('T', 'T');
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java
index 224914e0..7a6f0ae3 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java
@@ -31,6 +31,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateTimeValue, org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test extends AbstractTest {
@@ -40,7 +41,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test ext
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,7 +59,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var10) values(5, '2014-05-24 09:46:30')");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_at_start_point_is_different() {
DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -82,7 +83,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -92,7 +93,7 @@ public void should_fail_because_value_at_end_point_is_different() {
DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java
index 985a407b..d192c257 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateValue, org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test extends AbstractTest {
@@ -38,7 +39,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test extends
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -55,7 +56,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var9) values(5, '2014-05-24')");
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var9").hasValues(DateValue.of(2014, 5, 24), DateValue.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -77,7 +78,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -85,7 +86,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var9").hasValues(DateValue.of(2014, 5, 24), DateValue.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java
index 599e8c80..e8eb4fd8 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Number, Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test extends Ab
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -53,7 +54,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var3) values(5, 3)");
changes.setEndPointNow();
@@ -61,7 +62,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var3").hasValues(3, 3);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -75,7 +76,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -83,7 +84,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var3").hasValues(2, 2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java
index 1718cc24..23743b9f 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(String, String)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_String_Test extends AbstractTest {
@@ -37,7 +38,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_String_Test extends Ab
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -56,7 +57,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var12, var15) values(5, 'test', '88838129-291E-40A9-A94C-A15BE36CF7C3')");
changes.setEndPointNow();
@@ -64,7 +65,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var12").hasValues("test", "test");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -74,7 +75,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var15").hasValues("88838129-291E-40A9-A94C-A15BE36CF7C3", "88838129-291E-40A9-A94C-A15BE36CF7C3");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -96,7 +97,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var12").hasValues("text", "text");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -106,7 +107,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var15").hasValues("30B443AE-C0C9-4790-9BEC-CE1380808435", "30B443AE-C0C9-4790-9BEC-CE1380808435");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java
index aa8f046b..e634ef23 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.TimeValue, org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test extends AbstractTest {
@@ -38,7 +39,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test extends
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -55,7 +56,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var8) values(5, '09:46:30')");
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_value_at_start_point_is_different() {
assertThat(changes).change().column("var8").hasValues(TimeValue.of(9, 46, 30), TimeValue.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -77,7 +78,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -85,7 +86,7 @@ public void should_fail_because_value_at_end_point_is_different() {
assertThat(changes).change().column("var8").hasValues(TimeValue.of(9, 46, 30), TimeValue.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java
index 50ff516e..b0856013 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java
@@ -39,7 +39,7 @@ public class AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test extends Abst
@Test
@NeedReload
public void test_has_values() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var15 = '0E2A1269-EFF0-4233-B87B-B53E8B6F164D' where var1 = 1");
changes.setEndPointNow();
@@ -57,7 +57,7 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_value_at_start_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("insert into test(var1, var15) values(5, '0E2A1269-EFF0-4233-B87B-B53E8B6F164D')");
changes.setEndPointNow();
@@ -67,7 +67,7 @@ public void should_fail_because_value_at_start_point_is_different() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that start point:%n"
+ " %n"
+ "to be equal to: %n"
@@ -81,7 +81,7 @@ public void should_fail_because_value_at_start_point_is_different() {
@Test
@NeedReload
public void should_fail_because_value_at_end_point_is_different() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("delete from test where var1 = 1");
changes.setEndPointNow();
@@ -91,7 +91,7 @@ public void should_fail_because_value_at_end_point_is_different() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that end point:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java
index 39d2555e..8792ca07 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isBoolean(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsBoolean_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsBoolean_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_boolean() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var2");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isBoolean(true);
@@ -65,18 +66,18 @@ public void test_is_boolean() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var2").isBoolean(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isBoolean(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java
index 28386c6f..c5b92637 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isBytes(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsBytes_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsBytes_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_bytes() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var11");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isBytes(true);
@@ -65,18 +66,18 @@ public void test_is_bytes() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var11").isBytes(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isBytes(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java
index e3e5d0ac..7ce2ce28 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isDateTime(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsDateTime_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsDateTime_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_date_time() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var10");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isDateTime(true);
@@ -65,18 +66,18 @@ public void test_is_date_time() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var10").isDateTime(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isDateTime(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java
index cbcf2687..a240b569 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isDate(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsDate_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsDate_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_date() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var9");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isDate(true);
@@ -65,18 +66,18 @@ public void test_is_date() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var9").isDate(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isDate(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java
index 477754fd..0b5af595 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isNumber(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsNumber_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsNumber_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_number() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var3");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isNumber(true);
@@ -65,18 +66,18 @@ public void test_is_number() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var3").isNumber(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var2").isNumber(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java
index ea1e7432..f023cebf 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isOfAnyTypeIn(org.assertj.db.type.ValueType...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsOfAnyTypeIn_Test extends AbstractTest {
@@ -39,12 +40,12 @@ public class AssertOnColumnType_IsOfAnyTypeIn_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_of_any_of_types() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var2");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isOfAnyTypeIn(ValueType.BOOLEAN,
@@ -68,18 +69,18 @@ public void test_is_of_any_of_types() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var2").isOfAnyTypeIn(ValueType.BOOLEAN, ValueType.TEXT);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -92,7 +93,7 @@ public void should_fail_because_value_have_different_type() {
ValueType.NOT_IDENTIFIED);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java
index df82c6f9..e9b6dc73 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isOfType(org.assertj.db.type.ValueType, boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsOfType_Test extends AbstractTest {
@@ -39,12 +40,12 @@ public class AssertOnColumnType_IsOfType_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_of_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var2");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isOfType(ValueType.BOOLEAN, true);
@@ -66,18 +67,18 @@ public void test_is_of_type() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var2").isOfType(ValueType.BOOLEAN, false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -89,7 +90,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isOfType(ValueType.BOOLEAN, true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java
index 78456154..819fdb48 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isText(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsText_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsText_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_text() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var12");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isText(true);
@@ -65,18 +66,18 @@ public void test_is_text() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var12").isText(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isText(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java
index ae9d13d5..f79e8eea 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnColumnType#isTime(boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnColumnType_IsTime_Test extends AbstractTest {
@@ -38,12 +39,12 @@ public class AssertOnColumnType_IsTime_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_time() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var8");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isTime(true);
@@ -65,18 +66,18 @@ public void test_is_time() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
update("insert into test(var1, var2, var11, var10, var9, var3, var12, var8) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var8").isTime(false);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -88,7 +89,7 @@ public void should_fail_because_value_have_different_type() {
assertThat(changes).change(1).column("var1").isTime(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsUUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsUUID_Test.java
index 57876eff..7be00e34 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsUUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsUUID_Test.java
@@ -38,13 +38,13 @@ public class AssertOnColumnType_IsUUID_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_UUID() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var15 = '0E2A1269-EFF0-4233-B87B-B53E8B6F164D' where var1 = 1");
update(
"insert into test(var1, var2, var11, var10, var9, var3, var12, var8, var15) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30', '2B0D1BDD-909E-4362-BA10-C930BA82718D')");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var15");
ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isUUID(true);
@@ -66,20 +66,20 @@ public void test_is_UUID() {
@Test
@NeedReload
public void should_fail_because_value_have_different_type() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
update("update test set var15 = null where var1 = 1");
update(
"insert into test(var1, var2, var11, var10, var9, var3, var12, var8, var15) values(5, true, FILE_READ('classpath:h2-logo-2.png'), '2014-05-24 09:46:30', '2014-05-24', 3, 'test', '09:46:30', null)");
changes.setEndPointNow();
- Table table = new Table(source, "test");
- Table table2 = new Table(source, "test2");
+ Table table = assertDbConnection.table("test").build();
+ Table table2 = assertDbConnection.table("test2").build();
try {
assertThat(changes).change().column("var15").isUUID(false);
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " %n"
+ "to be of type%n"
@@ -92,7 +92,7 @@ public void should_fail_because_value_have_different_type() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at start point:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnDataType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnDataType_Test.java
index 300b4bcb..704f2a1a 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnDataType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnDataType_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnDataType#isOnDataType(org.assertj.db.type.DataType)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnDataType_IsOnDataType_Test extends AbstractTest {
@@ -38,9 +39,9 @@ public class AssertOnDataType_IsOnDataType_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_on_data_type() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_is_on_data_type() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -54,9 +55,9 @@ public void test_is_on_data_type() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_data_type_is_different() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_data_type_is_different() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -64,7 +65,7 @@ public void should_fail_because_data_type_is_different() throws Exception {
assertThat(changes).change().isOnDataType(DataType.TABLE);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be on data type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java
index ae68b6e2..43a816f5 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnDataType#isOnRequest()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnDataType_IsOnRequest_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnDataType_IsOnRequest_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_on_request() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void test_is_on_request() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +54,9 @@ public void test_is_on_request() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_data_type_is_different() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void should_fail_because_data_type_is_different() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_data_type_is_different() throws Exception {
assertThat(changes).change().isOnRequest();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be on data type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java
index 5cb2a755..49984e70 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnDataType#isOnTable(String)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnDataType_IsOnTable_Name_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnDataType_IsOnTable_Name_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_on_table() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_is_on_table() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +54,9 @@ public void test_is_on_table() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_data_type_is_different() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_data_type_is_different() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_data_type_is_different() throws Exception {
assertThat(changes).change().isOnTable("actor");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be on data type%n"
+ " %n"
@@ -77,9 +78,9 @@ public void should_fail_because_data_type_is_different() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_table_name_is_different() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void should_fail_because_table_name_is_different() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -87,7 +88,7 @@ public void should_fail_because_table_name_is_different() throws Exception {
assertThat(changes).change().isOnTable("movie");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting to be on the table:%n"
+ " <\"movie\">%n"
+ "but was on the table:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java
index b42898c0..af98826c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnDataType#isOnTable()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnDataType_IsOnTable_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnDataType_IsOnTable_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_is_on_table() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_is_on_table() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +54,9 @@ public void test_is_on_table() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_data_type_is_different() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_data_type_is_different() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_data_type_is_different() throws Exception {
assertThat(changes).change().isOnTable();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ "to be on data type%n"
+ " %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java
index 2b8b1c98..3d67fa0d 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java
@@ -36,7 +36,7 @@ public class AssertOnExistence_DoesNotExist_Test extends AbstractTest {
@Test
@NeedReload
public void test_table_does_not_exist() {
- Table table = new Table(source, "not-exist-test");
+ Table table = assertDbConnection.table("not-exist-test").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssertExistReturn = tableAssert.doesNotExist();
Assertions.assertThat(tableAssert).isSameAs(tableAssertExistReturn);
@@ -48,7 +48,7 @@ public void test_table_does_not_exist() {
@Test
@NeedReload
public void should_fail_because_table_exist() {
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
try {
assertThat(table).doesNotExist();
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java
index 42fa7ead..7ccbf59b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java
@@ -36,7 +36,7 @@ public class AssertOnExistence_Exists_Test extends AbstractTest {
@Test
@NeedReload
public void test_table_exists() {
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssertExistReturn = tableAssert.exists();
Assertions.assertThat(tableAssert).isSameAs(tableAssertExistReturn);
@@ -48,7 +48,7 @@ public void test_table_exists() {
@Test
@NeedReload
public void should_fail_because_table_not_exist() {
- Table table = new Table(source, "not-exist-test");
+ Table table = assertDbConnection.table("not-exist-test").build();
try {
assertThat(table).exists();
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java
index d9dd743c..3739cf51 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumn#isModified()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumn_IsModified_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnModifiedColumn_IsModified_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_modified() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -51,7 +52,7 @@ public void test_is_modified() {
@Test
@NeedReload
public void should_fail_because_column_is_not_modified() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_column_is_not_modified() {
assertThat(changes).change(3).column().isModified();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " <1>%n"
+ "is modified but is still:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java
index 6883bb31..d08e5320 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumn#isNotModified()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumn_IsNotModified_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnModifiedColumn_IsNotModified_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_not_modified() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -51,7 +52,7 @@ public void test_is_not_modified() {
@Test
@NeedReload
public void should_fail_because_column_is_modified() {
- Changes changes = new Changes(source).setStartPointNow();
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_column_is_modified() {
assertThat(changes).change().column().isNotModified();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " %n"
+ "is not modified but is :%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java
index 6b91bc06..ec56dcfa 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasModifiedColumns(Integer...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasModifiedColumns_Integer_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasModifiedColumns_Integer_Test extends Abs
*/
@Test
@NeedReload
- public void test_has_modified_columns() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_modified_columns() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_modified_columns() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_modified_columns_are_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_modified_columns_are_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_modified_columns_are_different() throws Exceptio
assertThat(changes).change(3).hasModifiedColumns(1);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " [1]%n"
+ "as indexes of modified columns but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java
index 697039f7..2302d03d 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns(String...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasModifiedColumns_String_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasModifiedColumns_String_Test extends Abst
*/
@Test
@NeedReload
- public void test_has_modified_columns() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_modified_columns() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_modified_columns() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_modified_columns_are_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_modified_columns_are_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_modified_columns_are_different() throws Exceptio
assertThat(changes).change(3).hasModifiedColumns("ID");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " [\"ID\"]%n"
+ "as modified columns but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java
index 065c1f0d..dfb3326d 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsGreaterThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqua
*/
@Test
@NeedReload
- public void test_has_number_of_modified_columns_greater_than_or_equal_to() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_number_of_modified_columns_greater_than_or_equal_to() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_number_of_modified_columns_greater_than_or_equal_to() throw
*/
@Test
@NeedReload
- public void should_fail_because_number_of_modified_columns_is_less() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_modified_columns_is_less() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_number_of_modified_columns_is_less() throws Exce
assertThat(changes).change(3).hasNumberOfModifiedColumnsGreaterThanOrEqualTo(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " number of modifications is greater than or equal to 2%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java
index 660899b0..4e2e4d14 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsGreaterThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test
*/
@Test
@NeedReload
- public void test_has_number_of_modified_columns_greater_than() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_number_of_modified_columns_greater_than() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_number_of_modified_columns_greater_than() throws Exception
*/
@Test
@NeedReload
- public void should_fail_because_number_of_modified_columns_is_less_or_equal() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_modified_columns_is_less_or_equal() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_number_of_modified_columns_is_less_or_equal() th
assertThat(changes).change(3).hasNumberOfModifiedColumnsGreaterThan(1);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " number of modifications is greater than 1%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java
index 0086442c..c2ff9a20 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsLessThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo
*/
@Test
@NeedReload
- public void test_has_number_of_modified_columns_less_than_or_equal_to() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_number_of_modified_columns_less_than_or_equal_to() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_number_of_modified_columns_less_than_or_equal_to() throws E
*/
@Test
@NeedReload
- public void should_fail_because_number_of_modified_columns_is_greater() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_modified_columns_is_greater() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_number_of_modified_columns_is_greater() throws E
assertThat(changes).change(3).hasNumberOfModifiedColumnsLessThanOrEqualTo(0);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " number of modifications is less than or equal to 0%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java
index a285a6ef..8cde3f6a 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsLessThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test ext
*/
@Test
@NeedReload
- public void test_has_number_of_modified_columns_less_than() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_number_of_modified_columns_less_than() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_number_of_modified_columns_less_than() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_modified_columns_is_greater_or_equal() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_modified_columns_is_greater_or_equal() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_number_of_modified_columns_is_greater_or_equal()
assertThat(changes).change(3).hasNumberOfModifiedColumnsLessThan(1);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " number of modifications is less than 1%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java
index f902b90f..236be136 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumns(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test extends Abs
*/
@Test
@NeedReload
- public void test_has_number_of_modified_columns() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_number_of_modified_columns() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_number_of_modified_columns() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_modified_columns_is_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_modified_columns_is_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_number_of_modified_columns_is_different() throws
assertThat(changes).change(3).hasNumberOfModifiedColumns(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " 2 modifications%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java
index 78c3e623..01686b2d 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesGreaterThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test
*/
@Test
@NeedReload
- public void test_has_number_of_changes_greater_than_or_equal_to() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_has_number_of_changes_greater_than_or_equal_to() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +54,9 @@ public void test_has_number_of_changes_greater_than_or_equal_to() throws Excepti
*/
@Test
@NeedReload
- public void should_fail_because_number_of_changes_is_less() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_number_of_changes_is_less() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_number_of_changes_is_less() throws Exception {
assertThat(changes).hasNumberOfChangesGreaterThanOrEqualTo(9);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of changes) to be greater than or equal to :%n"
+ " <9>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java
index f66b834c..980d71c2 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesGreaterThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test extends
*/
@Test
@NeedReload
- public void test_has_number_of_changes_greater_than() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_has_number_of_changes_greater_than() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +54,9 @@ public void test_has_number_of_changes_greater_than() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_changes_is_less_or_equal() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_number_of_changes_is_less_or_equal() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_number_of_changes_is_less_or_equal() throws Exce
assertThat(changes).hasNumberOfChangesGreaterThan(4);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of changes) to be greater than :%n"
+ " <4>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java
index 7e72be01..173271d8 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java
@@ -20,7 +20,6 @@
import org.assertj.db.common.AbstractTest;
import org.assertj.db.common.NeedReload;
import org.assertj.db.type.Changes;
-import org.assertj.db.type.Request;
import org.assertj.db.type.Table;
import org.junit.Test;
@@ -29,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesLessThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test extends AbstractTest {
@@ -37,9 +37,9 @@ public class AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test ex
*/
@Test
@NeedReload
- public void test_has_number_of_changes_greater_than_or_equal_to() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_has_number_of_changes_greater_than_or_equal_to() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +53,8 @@ public void test_has_number_of_changes_greater_than_or_equal_to() throws Excepti
*/
@Test
@NeedReload
- public void should_fail_because_number_of_changes_is_greater() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_number_of_changes_is_greater() {
+ Changes changes = assertDbConnection.changes().request("select * from actor").build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +62,7 @@ public void should_fail_because_number_of_changes_is_greater() throws Exception
assertThat(changes).hasNumberOfChangesLessThanOrEqualTo(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of changes) to be less than or equal to :%n"
+ " <2>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java
index ca8bfef4..1c3a58cb 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesLessThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test extends Abs
*/
@Test
@NeedReload
- public void test_has_number_of_changes_greater_than() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_has_number_of_changes_greater_than() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -53,9 +54,9 @@ public void test_has_number_of_changes_greater_than() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_changes_is_greater_or_equal() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_number_of_changes_is_greater_or_equal() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -63,7 +64,7 @@ public void should_fail_because_number_of_changes_is_greater_or_equal() throws E
assertThat(changes).hasNumberOfChangesLessThan(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of changes) to be less than :%n"
+ " <2>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java
index def35ac6..79a4380e 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChanges(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfChanges_HasNumberOfChanges_Test extends AbstractTest {
@@ -37,9 +38,9 @@ public class AssertOnNumberOfChanges_HasNumberOfChanges_Test extends AbstractTes
*/
@Test
@NeedReload
- public void test_has_number_of_changes() throws Exception {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ public void test_has_number_of_changes() {
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -47,7 +48,7 @@ public void test_has_number_of_changes() throws Exception {
ChangesAssert changesAssert2 = changesAssert.hasNumberOfChanges(3);
Assertions.assertThat(changesAssert).isSameAs(changesAssert2);
- assertThat(new Changes(table).setStartPointNow().setEndPointNow()).hasNumberOfChanges(0);
+ assertThat(assertDbConnection.changes().tables(table).build().setStartPointNow().setEndPointNow()).hasNumberOfChanges(0);
}
/**
@@ -55,9 +56,9 @@ public void test_has_number_of_changes() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_changes_is_different() throws Exception {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ public void should_fail_because_number_of_changes_is_different() {
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -65,7 +66,7 @@ public void should_fail_because_number_of_changes_is_different() throws Exceptio
assertThat(changes).hasNumberOfChanges(9);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of changes) to be equal to :%n"
+ " <9>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java
index d2d495d2..df2498c7 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsGreaterThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test
@Test
@NeedReload
public void test_has_number_of_columns() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -69,8 +70,8 @@ public void test_has_number_of_columns() {
@Test
@NeedReload
public void should_fail_because_number_of_columns_is_greater() {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -78,7 +79,7 @@ public void should_fail_because_number_of_columns_is_greater() {
assertThat(changes).change().hasNumberOfColumnsGreaterThanOrEqualTo(6);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be greater than or equal to :%n"
+ " <6>%n"
+ "but was:%n"
@@ -88,7 +89,7 @@ public void should_fail_because_number_of_columns_is_greater() {
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThanOrEqualTo(6);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be greater than or equal to :%n"
+ " <6>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java
index d93b8201..8bb12601 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsGreaterThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test extends
@Test
@NeedReload
public void test_has_number_of_columns() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -69,8 +70,8 @@ public void test_has_number_of_columns() {
@Test
@NeedReload
public void should_fail_because_number_of_columns_is_different() {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -78,7 +79,7 @@ public void should_fail_because_number_of_columns_is_different() {
assertThat(changes).change().hasNumberOfColumnsGreaterThan(9);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be greater than :%n"
+ " <9>%n"
+ "but was:%n"
@@ -88,7 +89,7 @@ public void should_fail_because_number_of_columns_is_different() {
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThan(9);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be greater than :%n"
+ " <9>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java
index df96b2ea..3b907c53 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsLessThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test ex
@Test
@NeedReload
public void test_has_number_of_columns_less_than_or_equal() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -69,8 +70,8 @@ public void test_has_number_of_columns_less_than_or_equal() {
@Test
@NeedReload
public void should_fail_because_number_of_columns_is_less() {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -78,7 +79,7 @@ public void should_fail_because_number_of_columns_is_less() {
assertThat(changes).change().hasNumberOfColumnsLessThanOrEqualTo(4);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be less than or equal to :%n"
+ " <4>%n"
+ "but was:%n"
@@ -88,7 +89,7 @@ public void should_fail_because_number_of_columns_is_less() {
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThanOrEqualTo(4);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be less than or equal to :%n"
+ " <4>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java
index ace13f09..60400399 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsLessThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test extends Abs
@Test
@NeedReload
public void test_has_number_of_columns_less_than() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -69,8 +70,8 @@ public void test_has_number_of_columns_less_than() {
@Test
@NeedReload
public void should_fail_because_number_of_columns_is_greater_or_equal() {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -78,7 +79,7 @@ public void should_fail_because_number_of_columns_is_greater_or_equal() {
assertThat(changes).change().hasNumberOfColumnsLessThan(5);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be less than :%n"
+ " <5>%n"
+ "but was:%n"
@@ -88,7 +89,7 @@ public void should_fail_because_number_of_columns_is_greater_or_equal() {
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThan(4);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be less than :%n"
+ " <4>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java
index 2ce8c180..ccb75af1 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumns(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfColumns_HasNumberOfColumns_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnNumberOfColumns_HasNumberOfColumns_Test extends AbstractTes
@Test
@NeedReload
public void test_has_number_of_columns() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -69,8 +70,8 @@ public void test_has_number_of_columns() {
@Test
@NeedReload
public void should_fail_because_number_of_columns_is_different() {
- Request request = new Request(source, "select * from actor");
- Changes changes = new Changes(request).setStartPointNow();
+ Request request = assertDbConnection.request("select * from actor").build();
+ Changes changes = assertDbConnection.changes().request(request).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -78,7 +79,7 @@ public void should_fail_because_number_of_columns_is_different() {
assertThat(changes).change().hasNumberOfColumns(9);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be equal to :%n"
+ " <9>%n"
+ "but was:%n"
@@ -88,7 +89,7 @@ public void should_fail_because_number_of_columns_is_different() {
assertThat(changes).change().rowAtEndPoint().hasNumberOfColumns(9);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting size (number of columns) to be equal to :%n"
+ " <9>%n"
+ "but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java
index a4fd5c97..542a9073 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsGreaterThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test exten
*/
@Test
public void test_has_number_of_rows_greater_than_or_equal_to() {
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssert2 = tableAssert.hasNumberOfRowsGreaterThanOrEqualTo(3);
Assertions.assertThat(tableAssert).isSameAs(tableAssert2);
@@ -50,7 +51,7 @@ public void test_has_number_of_rows_greater_than_or_equal_to() {
*/
@Test
public void should_fail_because_number_of_rows_is_less() {
- Request request = new Request(source, "select * from actor");
+ Request request = assertDbConnection.request("select * from actor").build();
try {
assertThat(request).hasNumberOfRowsGreaterThanOrEqualTo(9);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java
index fb6b4563..c311d733 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsGreaterThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test extends Abstra
*/
@Test
public void test_has_number_of_rows_greater_than() {
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssert2 = tableAssert.hasNumberOfRowsGreaterThan(2);
Assertions.assertThat(tableAssert).isSameAs(tableAssert2);
@@ -50,7 +51,7 @@ public void test_has_number_of_rows_greater_than() {
*/
@Test
public void should_fail_because_number_of_rows_is_less_or_equal() {
- Request request = new Request(source, "select * from actor");
+ Request request = assertDbConnection.request("select * from actor").build();
try {
assertThat(request).hasNumberOfRowsGreaterThan(9);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java
index 29c51993..71b6c551 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsLessThanOrEqualTo(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test extends
*/
@Test
public void test_has_number_of_rows_less_than_or_equal_to() {
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssert2 = tableAssert.hasNumberOfRowsLessThanOrEqualTo(3);
Assertions.assertThat(tableAssert).isSameAs(tableAssert2);
@@ -50,7 +51,7 @@ public void test_has_number_of_rows_less_than_or_equal_to() {
*/
@Test
public void should_fail_because_number_of_rows_is_greater() {
- Request request = new Request(source, "select * from actor");
+ Request request = assertDbConnection.request("select * from actor").build();
try {
assertThat(request).hasNumberOfRowsLessThanOrEqualTo(2);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java
index aae43606..c774757d 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsLessThan(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test extends AbstractT
*/
@Test
public void test_has_number_of_rows_less_than() {
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssert2 = tableAssert.hasNumberOfRowsLessThan(4);
Assertions.assertThat(tableAssert).isSameAs(tableAssert2);
@@ -50,7 +51,7 @@ public void test_has_number_of_rows_less_than() {
*/
@Test
public void should_fail_because_number_of_rows_is_greater_or_equal() {
- Request request = new Request(source, "select * from actor");
+ Request request = assertDbConnection.request("select * from actor").build();
try {
assertThat(request).hasNumberOfRowsLessThan(2);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java
index aec45441..1393c080 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java
@@ -28,6 +28,7 @@
* {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRows(int)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnNumberOfRows_HasNumberOfRows_Test extends AbstractTest {
@@ -36,7 +37,7 @@ public class AssertOnNumberOfRows_HasNumberOfRows_Test extends AbstractTest {
*/
@Test
public void test_has_number_of_rows() {
- Table table = new Table(source, "actor");
+ Table table = assertDbConnection.table("actor").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssert2 = tableAssert.hasNumberOfRows(3);
Assertions.assertThat(tableAssert).isSameAs(tableAssert2);
@@ -50,7 +51,7 @@ public void test_has_number_of_rows() {
*/
@Test
public void should_fail_because_number_of_rows_is_different() {
- Request request = new Request(source, "select * from actor");
+ Request request = assertDbConnection.request("select * from actor").build();
try {
assertThat(request).hasNumberOfRows(9);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java
index f9752ca0..fd7f744d 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java
@@ -37,7 +37,7 @@ public class AssertOnNumberOfRows_IsEmpty_Test extends AbstractTest {
@Test
public void test_is_empty() {
update("delete from test");
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableAssert tableAssert = assertThat(table);
TableAssert tableAssert2 = tableAssert.isEmpty();
Assertions.assertThat(tableAssert).isSameAs(tableAssert2);
@@ -51,7 +51,7 @@ public void test_is_empty() {
*/
@Test
public void should_fail_because_table_is_not_empty() {
- Request request = new Request(source, "select * from actor");
+ Request request = assertDbConnection.request("select * from actor").build();
try {
assertThat(request).isEmpty();
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java
index 06e8a4b2..3d806a50 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnPrimaryKey#hasPksNames(String...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnPrimaryKey_HasPksNames_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnPrimaryKey_HasPksNames_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_has_pks_names() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_pks_names() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_pks_names() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_pks_names_are_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_pks_names_are_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_pks_names_are_different() throws Exception {
assertThat(changes).change().hasPksNames("ID2");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " [\"ID2\"]%n"
+ "to be the name of the columns of the primary keys but was:%n"
@@ -72,8 +73,8 @@ public void should_fail_because_pks_names_are_different() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_pks_names_are_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_pks_names_are_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -81,7 +82,7 @@ public void should_fail_because_number_of_pks_names_are_different() throws Excep
assertThat(changes).change().hasPksNames("ID", "ID2");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " [\"ID\", \"ID2\"]%n"
+ "to be the name of the columns of the primary keys but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java
index c3b19419..effa9d6e 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java
@@ -27,6 +27,7 @@
* {@link org.assertj.db.api.assertions.AssertOnPrimaryKey#hasPksValues(Object...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnPrimaryKey_HasPksValues_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class AssertOnPrimaryKey_HasPksValues_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_has_pks_values() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_has_pks_values() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -50,8 +51,8 @@ public void test_has_pks_values() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_pks_values_are_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_pks_values_are_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -59,7 +60,7 @@ public void should_fail_because_pks_values_are_different() throws Exception {
assertThat(changes).change().hasPksValues(5);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " [5]%n"
+ "to be the values of the columns of the primary keys but was:%n"
@@ -72,8 +73,8 @@ public void should_fail_because_pks_values_are_different() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_number_of_pks_values_are_different() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_number_of_pks_values_are_different() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -81,7 +82,7 @@ public void should_fail_because_number_of_pks_values_are_different() throws Exce
assertThat(changes).change().hasPksValues(4, "ID2");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting :%n"
+ " [4, \"ID2\"]%n"
+ "to be the values of the columns of the primary keys but was:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java
index 5dc3b4a9..ccb13ef3 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java
@@ -42,8 +42,8 @@ public class AssertOnRowCondition_HasValuesSatisfying_Test extends AbstractTest
@Test
@NeedReload
public void test_has_values() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -90,8 +90,8 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_values_are_different() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -106,7 +106,7 @@ public void should_fail_because_values_are_different() {
);
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at index 2:%n"
+ " \"Bill\"%n"
+ "to satisfy: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java
index dc37ea4f..497b7800 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnRowEquality#hasValues(Object...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnRowEquality_HasValues_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnRowEquality_HasValues_Test extends AbstractTest {
@Test
@NeedReload
public void test_has_values() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -62,15 +63,15 @@ public void test_has_values() {
@Test
@NeedReload
public void should_fail_because_values_are_different() {
- Table table = new Table(source, "actor");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("actor").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
try {
assertThat(changes).change().rowAtEndPoint().hasValues(4, "Murray", "Billy", "1950-09-21", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"));
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting that the value at index 2:%n"
+ " <\"Bill\">%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java
index 8d9418be..6c3ae337 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java
@@ -32,7 +32,7 @@ public class AssertOnRowNullity_HasOnlyNotNullValues_Test extends AbstractTest {
*/
@Test
public void test_has_only_not_null_values() {
- Table table = new Table(source, "test");
+ Table table = assertDbConnection.table("test").build();
TableRowAssert tableRowAssert = assertThat(table).row();
TableRowAssert tableRowAssert2 = tableRowAssert.hasOnlyNotNullValues();
Assertions.assertThat(tableRowAssert).isSameAs(tableRowAssert2);
@@ -42,8 +42,8 @@ public void test_has_only_not_null_values() {
* This method should fail because the row has a null value.
*/
@Test
- public void should_fail_because_row_has_null_value() throws Exception {
- Table table = new Table(source, "test2");
+ public void should_fail_because_row_has_null_value() {
+ Table table = assertDbConnection.table("test2").build();
TableRowAssert tableRowAssert = assertThat(table).row().row();
try {
tableRowAssert.hasOnlyNotNullValues();
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java
index 341399db..42007162 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnRowOfChangeExistence#doesNotExist()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnRowOfChangeExistence_DoesNotExist_Test extends AbstractTest {
@@ -34,8 +35,8 @@ public class AssertOnRowOfChangeExistence_DoesNotExist_Test extends AbstractTest
*/
@Test
@NeedReload
- public void test_does_not_exists() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_does_not_exists() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -49,15 +50,15 @@ public void test_does_not_exists() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_row_exists() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_row_exists() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
try {
assertThat(changes).change().rowAtEndPoint().doesNotExist();
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting not exist but exists"));
}
}
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java
index f14aad04..017f92d5 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java
@@ -26,6 +26,7 @@
* {@link org.assertj.db.api.assertions.AssertOnRowOfChangeExistence#exists()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnRowOfChangeExistence_Exists_Test extends AbstractTest {
@@ -34,8 +35,8 @@ public class AssertOnRowOfChangeExistence_Exists_Test extends AbstractTest {
*/
@Test
@NeedReload
- public void test_exists() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void test_exists() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
@@ -49,15 +50,15 @@ public void test_exists() throws Exception {
*/
@Test
@NeedReload
- public void should_fail_because_row_does_not_exist() throws Exception {
- Changes changes = new Changes(source).setStartPointNow();
+ public void should_fail_because_row_does_not_exist() {
+ Changes changes = assertDbConnection.changes().build().setStartPointNow();
updateChangesForTests();
changes.setEndPointNow();
try {
assertThat(changes).change().rowAtStartPoint().exists();
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at start point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at start point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting exist but do not exist"));
}
}
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java
index d6320924..75fb6f82 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test extends
@Test
@NeedReload
public void test_is_after_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_after_or_equal_to() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_before() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -73,7 +74,7 @@ public void should_fail_because_value_is_before() throws ParseException {
DateTimeValue.parse("2014-05-24T09:46:31"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java
index 41cb9189..dacc05f2 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test extends Abs
@Test
@NeedReload
public void test_is_after_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_after_or_equal_to() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_before() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -72,7 +73,7 @@ public void should_fail_because_value_is_before() throws ParseException {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfterOrEqualTo(DateValue.parse("2014-05-25"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java
index c9ccb311..15e2dc49 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test extends
@Test
@NeedReload
public void test_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_after_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_before() {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfterOrEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 31));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java
index b4068fe9..d25f9cef 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test extends Abs
@Test
@NeedReload
public void test_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_after_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_before() {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfterOrEqualTo(LocalDate.of(2014, 5, 25));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java
index 9e27a4fe..93f1356e 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test extends Abs
@Test
@NeedReload
public void test_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_after_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_before() {
assertThat(changes).change().column("var8").valueAtEndPoint().isAfterOrEqualTo(LocalTime.of(9, 46, 31));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java
index 508ebe6c..e0020e95 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfterOrEqualTo_String_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_String_Test extends Abstra
@Test
@NeedReload
public void test_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_after_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_before() {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfterOrEqualTo("2014-05-25");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java
index 9c754458..2efad82c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test extends Abs
@Test
@NeedReload
public void test_is_after_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_after_or_equal_to() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_before() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -72,7 +73,7 @@ public void should_fail_because_value_is_before() throws ParseException {
assertThat(changes).change().column("var8").valueAtEndPoint().isAfterOrEqualTo(TimeValue.parse("09:46:31"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be after or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java
index fc7dc21b..5f4f8929 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfter_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsAfter_DateTimeValue_Test extends Abstract
@Test
@NeedReload
public void test_is_after() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -61,8 +62,8 @@ public void test_is_after() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_before_or_equal_to() throws ParseExcept
assertThat(changes).change().column("var10").valueAtEndPoint().isAfter(DateTimeValue.parse("2014-05-24T09:46:30"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java
index f7e3d1ba..b67bed1c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfter_DateValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsAfter_DateValue_Test extends AbstractTest
@Test
@NeedReload
public void test_is_after() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -62,8 +63,8 @@ public void test_is_after() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -71,7 +72,7 @@ public void should_fail_because_value_is_before_or_equal_to() throws ParseExcept
assertThat(changes).change().column("var10").valueAtEndPoint().isAfter(DateValue.parse("2014-05-25"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java
index 1d73a65d..1e56867b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsAfter_LocalDateTime_Test extends Abstract
@Test
@NeedReload
public void test_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_after() {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_before_or_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfter(LocalDateTime.of(2014, 5, 24, 9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java
index 09e9a9f3..db6df0dd 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsAfter_LocalDate_Test extends AbstractTest
@Test
@NeedReload
public void test_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_after() {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_before_or_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfter(LocalDate.of(2014, 5, 25));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java
index 54f60a52..bb786ea8 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsAfter_LocalTime_Test extends AbstractTest
@Test
@NeedReload
public void test_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_after() {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_before_or_equal_to() {
assertThat(changes).change().column("var8").valueAtEndPoint().isAfter(LocalTime.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java
index 7160cb78..0dbb2165 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfter_String_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueChronology_IsAfter_String_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_after() {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_before_or_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isAfter("2014-05-25");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java
index aa3498fe..3d6f546b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsAfter_TimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsAfter_TimeValue_Test extends AbstractTest
@Test
@NeedReload
public void test_is_after() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -61,8 +62,8 @@ public void test_is_after() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_before_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_before_or_equal_to() throws ParseExcept
assertThat(changes).change().column("var8").valueAtEndPoint().isAfter(TimeValue.parse("09:46:30"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be after %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java
index a2751337..0b736b61 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test extend
@Test
@NeedReload
public void test_is_before_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -62,8 +63,8 @@ public void test_is_before_or_equal_to() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_after() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -71,7 +72,7 @@ public void should_fail_because_value_is_after() throws ParseException {
assertThat(changes).change().column("var10").valueAtEndPoint().isBeforeOrEqualTo(DateTimeValue.parse("2014-05-24T09:46:29"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java
index aedf5558..2cfa5439 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test extends Ab
@Test
@NeedReload
public void test_is_before_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_before_or_equal_to() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_after() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -72,7 +73,7 @@ public void should_fail_because_value_is_after() throws ParseException {
assertThat(changes).change().column("var10").valueAtEndPoint().isBeforeOrEqualTo(DateValue.parse("2014-05-24"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java
index 271d1783..02519f7b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test extend
@Test
@NeedReload
public void test_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_before_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_after() {
assertThat(changes).change().column("var10").valueAtEndPoint().isBeforeOrEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 29));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java
index fe45307f..a81d3881 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test extends Ab
@Test
@NeedReload
public void test_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_before_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_after() {
assertThat(changes).change().column("var10").valueAtEndPoint().isBeforeOrEqualTo(LocalDate.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java
index 3b5f9e22..aa6ac61c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test extends Ab
@Test
@NeedReload
public void test_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_before_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_after() {
assertThat(changes).change().column("var8").valueAtEndPoint().isBeforeOrEqualTo(LocalTime.of(9, 46, 29));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java
index c8492dc6..f979ee2b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBeforeOrEqualTo_String_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_String_Test extends Abstr
@Test
@NeedReload
public void test_is_before_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_before_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_after() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_after() {
assertThat(changes).change().column("var10").valueAtEndPoint().isBeforeOrEqualTo("2014-05-24");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java
index 1d3e2d44..c19a8c73 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test extends Ab
@Test
@NeedReload
public void test_is_before_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_before_or_equal_to() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_after() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -72,7 +73,7 @@ public void should_fail_because_value_is_after() throws ParseException {
assertThat(changes).change().column("var8").valueAtEndPoint().isBeforeOrEqualTo(TimeValue.parse("09:46:29"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be before or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java
index 840d67a3..d94fd80b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBefore_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsBefore_DateTimeValue_Test extends Abstrac
@Test
@NeedReload
public void test_is_before() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_before() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -73,7 +74,7 @@ public void should_fail_because_value_is_after_or_equal_to() throws ParseExcepti
DateTimeValue.parse("2014-05-24T09:46:30"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java
index 57812d72..7ca82e5a 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBefore_DateValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsBefore_DateValue_Test extends AbstractTes
@Test
@NeedReload
public void test_is_before() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -62,8 +63,8 @@ public void test_is_before() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -71,7 +72,7 @@ public void should_fail_because_value_is_after_or_equal_to() throws ParseExcepti
assertThat(changes).change().column("var10").valueAtEndPoint().isBefore(DateValue.parse("2014-05-24"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java
index ee80bc61..b51c2e34 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsBefore_LocalDateTime_Test extends Abstrac
@Test
@NeedReload
public void test_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_before() {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_after_or_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isBefore(LocalDateTime.of(2014, 5, 24, 9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java
index fcc5fd82..a19e3d80 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsBefore_LocalDate_Test extends AbstractTes
@Test
@NeedReload
public void test_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_before() {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_after_or_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isBefore(LocalDate.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java
index 5f4bfa40..23b3ddf1 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueChronology_IsBefore_LocalTime_Test extends AbstractTes
@Test
@NeedReload
public void test_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_before() {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_after_or_equal_to() {
assertThat(changes).change().column("var8").valueAtEndPoint().isBefore(LocalTime.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java
index 70e34457..cc7a70e1 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBefore_String_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueChronology_IsBefore_String_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_before() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_before() {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_after_or_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isBefore("2014-05-24");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java
index 1a00d7d5..f7724b15 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueChronology_IsBefore_TimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueChronology_IsBefore_TimeValue_Test extends AbstractTes
@Test
@NeedReload
public void test_is_before() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -61,8 +62,8 @@ public void test_is_before() throws ParseException {
@Test
@NeedReload
public void should_fail_because_value_is_after_or_equal_to() throws ParseException {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_after_or_equal_to() throws ParseExcepti
assertThat(changes).change().column("var8").valueAtEndPoint().isBefore(TimeValue.parse("09:46:30"));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be before %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java
index f5d61c90..67313b62 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueClass#isOfClass(Class)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueClass_IsOfClass_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueClass_IsOfClass_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_of_type() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_of_type() {
@Test
@NeedReload
public void should_fail_because_value_is_not_of_type() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_of_type() {
assertThat(changes).change().column("var1").valueAtEndPoint().isOfClass(Boolean.class);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of class%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java
index c1e89d53..317b3c5c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateTimeValue, org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test e
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -64,8 +65,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -74,7 +75,7 @@ public void should_fail_because_value_is_not_close_to() {
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateTimeValue.of(DateValue.of(0, 0, 0)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java
index dd91b910..99126655 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateTimeValue, org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test exten
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -64,8 +65,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -74,7 +75,7 @@ public void should_fail_because_value_is_not_close_to() {
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateValue.of(0, 0, 0));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java
index 6a12db9d..617ca5b5 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateTimeValue, org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test exten
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -64,8 +65,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -74,7 +75,7 @@ public void should_fail_because_value_is_not_close_to() {
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), TimeValue.of(0, 0, 0, 1));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java
index eab13dea..295a5680 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java
@@ -31,6 +31,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateValue, org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test extends AbstractTest {
@@ -40,8 +41,8 @@ public class AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test exten
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -61,8 +62,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_not_close_to() {
assertThat(changes).change().column("var9").valueAtEndPoint().isCloseTo(DateValue.of(2014, 5, 23), DateTimeValue.of(DateValue.of(0, 0, 0)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java
index f7c95a9d..e6dad5e2 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateValue, org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test extends A
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_not_close_to() {
assertThat(changes).change().column("var9").valueAtEndPoint().isCloseTo(DateValue.of(2014, 5, 23), DateValue.of(0, 0, 0));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java
index 12fadb2b..80688be4 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java
@@ -31,6 +31,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateValue, org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test extends AbstractTest {
@@ -40,8 +41,8 @@ public class AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test extends A
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +61,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_not_close_to() {
.of(0, 1, 0));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java
index 03f64d2e..db0eb0d9 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(Number, Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_Number_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueCloseness_IsCloseTo_Number_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_close_to() {
assertThat(changes).change().column("var3").valueAtEndPoint().isCloseTo(3, 0.5);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java
index a0b5a6f9..9e6c4089 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.TimeValue, org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test extends A
@Test
@NeedReload
public void test_is_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_close_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_close_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +70,7 @@ public void should_fail_because_value_is_not_close_to() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be close to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java
index 89a284ed..6bca3e68 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueComparison#isGreaterThanOrEqualTo(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueComparison_IsGreaterThanOrEqualTo_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueComparison_IsGreaterThanOrEqualTo_Test extends Abstrac
@Test
@NeedReload
public void test_is_greater_than_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_greater_than_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_less_than() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_less_than() {
assertThat(changes).change().column("var3").valueAtEndPoint().isGreaterThanOrEqualTo(3);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be greater than or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java
index 6e6812d8..a64aa1a5 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueComparison#isGreaterThan(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueComparison_IsGreaterThan_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueComparison_IsGreaterThan_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_less_than() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_less_than() {
@Test
@NeedReload
public void should_fail_because_value_is_greater_than_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_greater_than_or_equal_to() {
assertThat(changes).change().column("var3").valueAtEndPoint().isGreaterThan(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be greater than %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java
index 0f67f5e8..fabdb461 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueComparison#isLessThanOrEqualTo(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueComparison_IsLessThanOrEqualTo_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueComparison_IsLessThanOrEqualTo_Test extends AbstractTe
@Test
@NeedReload
public void test_is_less_than_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_less_than_or_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_greater_than() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_greater_than() {
assertThat(changes).change().column("var3").valueAtEndPoint().isLessThanOrEqualTo(1);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be less than or equal to %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java
index de5bff08..05af8128 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueComparison#isLessThan(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueComparison_IsLessThan_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueComparison_IsLessThan_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_less_than() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_less_than() {
@Test
@NeedReload
public void should_fail_because_value_is_greater_than_or_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_greater_than_or_equal_to() {
assertThat(changes).change().column("var3").valueAtEndPoint().isLessThan(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be less than %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java
index 031300dd..c39fcfaa 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java
@@ -46,8 +46,8 @@ public boolean matches(Byte value) {
@Test
@NeedReload
public void test_does_not_have() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -66,8 +66,8 @@ public void test_does_not_have() {
@Test
@NeedReload
public void should_fail_because_value_not_match_with_condition() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -77,7 +77,7 @@ public void should_fail_because_value_not_match_with_condition() {
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
"[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of "
- + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ + "Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting actual:%n"
+ " 0%n"
+ "not to be isZero"));
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java
index 12e4e905..e6fe6224 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java
@@ -46,8 +46,8 @@ public boolean matches(Byte value) {
@Test
@NeedReload
public void test_has() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -66,8 +66,8 @@ public void test_has() {
@Test
@NeedReload
public void should_fail_because_value_not_match_with_condition() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -77,7 +77,7 @@ public void should_fail_because_value_not_match_with_condition() {
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
"[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of "
- + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ + "Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting actual:%n"
+ " 2%n"
+ "to be isZero"));
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java
index 340eb1a3..3d822ce6 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java
@@ -46,8 +46,8 @@ public boolean matches(Byte value) {
@Test
@NeedReload
public void test_is_not() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -66,8 +66,8 @@ public void test_is_not() {
@Test
@NeedReload
public void should_fail_because_value_not_match_with_condition() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -77,7 +77,7 @@ public void should_fail_because_value_not_match_with_condition() {
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
"[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of "
- + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ + "Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting actual:%n"
+ " 0%n"
+ "not to be isZero"));
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java
index 2f4786e1..84c0c137 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java
@@ -46,8 +46,8 @@ public boolean matches(Byte value) {
@Test
@NeedReload
public void test_is() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -66,8 +66,8 @@ public void test_is() {
@Test
@NeedReload
public void should_fail_because_value_not_match_with_condition() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -77,7 +77,7 @@ public void should_fail_because_value_not_match_with_condition() {
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
"[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of "
- + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ + "Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting actual:%n"
+ " 2%n"
+ "to be isZero"));
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java
index b7a31cb5..dce376f1 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java
@@ -46,8 +46,8 @@ public boolean matches(Byte value) {
@Test
@NeedReload
public void test_satisfies() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -66,8 +66,8 @@ public void test_satisfies() {
@Test
@NeedReload
public void should_fail_because_value_not_match_with_condition() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -77,7 +77,7 @@ public void should_fail_because_value_not_match_with_condition() {
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
"[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of "
- + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ + "Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting actual:%n"
+ " 2%n"
+ "to satisfy:%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java
index 7d1659c1..3df11177 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_Boolean_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsEqualTo_Boolean_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 10");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var2").valueAtEndPoint().isEqualTo(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java
index 271edcd9..1c6d06cd 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(byte[])} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_Bytes_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueEquality_IsEqualTo_Bytes_Test extends AbstractTest {
public void test_is_equal_to() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -61,8 +62,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var11").valueAtEndPoint().isEqualTo(new byte[0]);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 10 (column name : VAR11) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 10 (column name : VAR11) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting to be equal to the expected value but was not equal"));
}
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java
index 11003d17..0442cd3c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Character)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_Character_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsEqualTo_Character_Test extends AbstractTest
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 10");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var16").valueAtEndPoint().isEqualTo('t');
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 15 (column name : VAR16) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 15 (column name : VAR16) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <\"e\">%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java
index 5c50f530..5b8f17b0 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueEquality_IsEqualTo_DateTimeValue_Test extends Abstract
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -62,8 +63,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -72,7 +73,7 @@ public void should_fail_because_value_is_not_equal_to() {
DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java
index 26636b2c..4352dfb9 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java
@@ -12,6 +12,9 @@
*/
package org.assertj.db.api.assertions;
+import static org.assertj.db.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+
import org.assertj.core.api.Assertions;
import org.assertj.db.api.ChangeColumnValueAssert;
import org.assertj.db.api.TableColumnValueAssert;
@@ -22,14 +25,12 @@
import org.assertj.db.type.Table;
import org.junit.Test;
-import static org.assertj.db.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
/**
* Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class :
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_DateValue_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueEquality_IsEqualTo_DateValue_Test extends AbstractTest
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var9").valueAtEndPoint().isEqualTo(DateValue.of(2014, 5, 23));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java
index a9d99854..837ff48b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueEquality_IsEqualTo_LocalDateTime_Test extends Abstract
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 31));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java
index 9782936f..d9533b11 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java
@@ -12,6 +12,11 @@
*/
package org.assertj.db.api.assertions;
+import static org.assertj.db.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+
+import java.time.LocalDate;
+
import org.assertj.core.api.Assertions;
import org.assertj.db.api.ChangeColumnValueAssert;
import org.assertj.db.api.TableColumnValueAssert;
@@ -21,11 +26,6 @@
import org.assertj.db.type.Table;
import org.junit.Test;
-import java.time.LocalDate;
-
-import static org.assertj.db.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
/**
* Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class :
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(java.time.LocalDate)} method.
@@ -40,8 +40,8 @@ public class AssertOnValueEquality_IsEqualTo_LocalDate_Test extends AbstractTest
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var9").valueAtEndPoint().isEqualTo(LocalDate.of(2014, 5, 23));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java
index f5e6fff4..3b86fbf0 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueEquality_IsEqualTo_LocalTime_Test extends AbstractTest
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var8").valueAtEndPoint().isEqualTo(LocalTime.of(9, 46, 31));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java
index 1c1c9a07..d3331a51 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_Number_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsEqualTo_Number_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var3").valueAtEndPoint().isEqualTo(3);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java
index e1f881cd..6a3ae767 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Object)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_Object_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsEqualTo_Object_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_null() {
- Table table = new Table(source, "test2");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test2").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test2 set var14 = 1 where var1 is null");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_null() {
@Test
@NeedReload
public void should_fail_because_value_is_not_null() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_null() {
assertThat(changes).change().column("var3").valueAtEndPoint().isEqualTo((Object) null);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java
index 9ad380f7..53f8afb1 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(String)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_String_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsEqualTo_String_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var12").valueAtEndPoint().isEqualTo("-");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 11 (column name : VAR12) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 11 (column name : VAR12) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <\"text\">%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java
index 95ac1ff5..39d02a14 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsEqualTo_TimeValue_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueEquality_IsEqualTo_TimeValue_Test extends AbstractTest
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_not_equal_to() {
assertThat(changes).change().column("var8").valueAtEndPoint().isEqualTo(TimeValue.of(9, 46, 31));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java
index 37b1b79d..40fd56fa 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueEquality_IsEqualTo_UUID_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var15 = '2B0D1BDD-909E-4362-BA10-C930BA82718D' where var1 = 1");
changes.setEndPointNow();
@@ -62,8 +62,8 @@ public void test_is_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var15 = '2B0D1BDD-909E-4362-BA10-C930BA82718D' where var1 = 10");
changes.setEndPointNow();
@@ -73,7 +73,7 @@ public void should_fail_because_value_is_not_equal_to() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2b0d1bdd-909e-4362-ba10-c930ba82718d>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java
index 4141fadb..a000d4b3 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isFalse()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsFalse_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsFalse_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_false() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 10");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_false() {
@Test
@NeedReload
public void should_fail_because_value_is_true() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_true() {
assertThat(changes).change().column("var2").valueAtEndPoint().isFalse();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java
index d3749bf5..fd23a89c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isTrue()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsTrue_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsTrue_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_true() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_true() {
@Test
@NeedReload
public void should_fail_because_value_is_false() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 10");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_false() {
assertThat(changes).change().column("var2").valueAtEndPoint().isTrue();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java
index cedb3d5e..42e956b4 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueEquality#isZero()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueEquality_IsZero_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueEquality_IsZero_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_zero() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_zero() {
@Test
@NeedReload
public void should_fail_because_value_is_not_zero() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_zero() {
assertThat(changes).change().column("var3").valueAtEndPoint().isZero();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java
index 9e944944..7c2e23d6 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Boolean)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_Boolean_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueInequality_IsNotEqualTo_Boolean_Test extends AbstractT
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 10");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var2").valueAtEndPoint().isNotEqualTo(true);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java
index cc72a6d0..7035f24f 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(byte[])} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_Bytes_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_Bytes_Test extends AbstractTes
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -61,8 +62,8 @@ public void test_is_not_equal_to() {
public void should_fail_because_value_is_equal_to() {
byte[] bytesH2 = bytesContentFromClassPathOf("h2-logo-2.png");
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -70,7 +71,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var11").valueAtEndPoint().isNotEqualTo(bytesH2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 10 (column name : VAR11) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 10 (column name : VAR11) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting to be not equal to the value but was equal"));
}
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java
index 6f967c46..f364e742 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Character)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_Character_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueInequality_IsNotEqualTo_Character_Test extends Abstrac
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 10");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var16").valueAtEndPoint().isNotEqualTo('T');
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 15 (column name : VAR16) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 15 (column name : VAR16) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <\"T\">%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java
index abda9f4c..3c05d0bc 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java
@@ -32,6 +32,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(org.assertj.db.type.DateTimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test extends AbstractTest {
@@ -41,8 +42,8 @@ public class AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test extends Abs
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -63,8 +64,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -73,7 +74,7 @@ public void should_fail_because_value_is_equal_to() {
.of(9, 46, 30)));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java
index aee43532..cc6ef554 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(org.assertj.db.type.DateValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_DateValue_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_DateValue_Test extends Abstrac
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var9").valueAtEndPoint().isNotEqualTo(DateValue.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java
index dd5f978a..916d2549 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test extends Abs
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var10").valueAtEndPoint().isNotEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24T09:46:30.000000000>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java
index e8b2ad2b..2be92f57 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_LocalDate_Test extends Abstrac
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var9").valueAtEndPoint().isNotEqualTo(LocalDate.of(2014, 5, 24));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2014-05-24>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java
index 742cfbd4..71117a46 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_LocalTime_Test extends Abstrac
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -60,8 +60,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -69,7 +69,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var8").valueAtEndPoint().isNotEqualTo(LocalTime.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java
index 17c12660..a5c6a3e4 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Number)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_Number_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueInequality_IsNotEqualTo_Number_Test extends AbstractTe
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var3").valueAtEndPoint().isNotEqualTo(2);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <2>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java
index b925765c..e862bab5 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Object)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_Object_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueInequality_IsNotEqualTo_Object_Test extends AbstractTe
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test2");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test2").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test2 set var14 = 1 where var1 is null");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var3").valueAtEndPoint().isNotEqualTo((Object) null);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 of Changes on TEST2 table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 of Changes on TEST2 table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java
index c491f36a..ec7e2337 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(String)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_String_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueInequality_IsNotEqualTo_String_Test extends AbstractTe
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var12").valueAtEndPoint().isNotEqualTo("text");
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 11 (column name : VAR12) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 11 (column name : VAR12) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <\"text\">%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java
index 7fdc6825..9be7c252 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(org.assertj.db.type.TimeValue)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotEqualTo_TimeValue_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_TimeValue_Test extends Abstrac
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_equal_to() {
assertThat(changes).change().column("var8").valueAtEndPoint().isNotEqualTo(TimeValue.of(9, 46, 30));
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <09:46:30.000000000>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java
index 9774ce14..72fb0a08 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java
@@ -40,8 +40,8 @@ public class AssertOnValueInequality_IsNotEqualTo_UUID_Test extends AbstractTest
@Test
@NeedReload
public void test_is_not_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var15 = 'F96EC595-CE91-47CC-9152-CCC8AC48AAD6' where var1 = 10");
changes.setEndPointNow();
@@ -62,8 +62,8 @@ public void test_is_not_equal_to() {
@Test
@NeedReload
public void should_fail_because_value_is_equal_to() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var15 = 'F96EC595-CE91-47CC-9152-CCC8AC48AAD6' where var1 = 1");
changes.setEndPointNow();
@@ -73,7 +73,7 @@ public void should_fail_because_value_is_equal_to() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java
index 316670d0..9e4ac919 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotZero()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueInequality_IsNotZero_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueInequality_IsNotZero_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_not_zero() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_zero() {
@Test
@NeedReload
public void should_fail_because_value_is_zero() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1000");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_zero() {
assertThat(changes).change().column("var3").valueAtEndPoint().isNotZero();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <0>%n"
+ "not to be equal to: %n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java
index 2d878b8f..40beba62 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueNullity#isNotNull()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueNullity_IsNotNull_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueNullity_IsNotNull_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_not_null() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_not_null() {
@Test
@NeedReload
public void should_fail_because_value_is_null() {
- Table table = new Table(source, "test2");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test2").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test2 set var14 = 1 where var1 is null");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_null() {
assertThat(changes).change().column("var3").valueAtEndPoint().isNotNull();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 of Changes on TEST2 table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 of Changes on TEST2 table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting actual not to be null"));
}
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java
index b786ed8c..2ad40701 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueNullity#isNull()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueNullity_IsNull_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueNullity_IsNull_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_null() {
- Table table = new Table(source, "test2");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test2").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test2 set var14 = 1 where var1 is null");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_null() {
@Test
@NeedReload
public void should_fail_because_value_is_not_null() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,13 +68,13 @@ public void should_fail_because_value_is_not_null() {
assertThat(changes).change().column("var3").valueAtEndPoint().isNull();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] expected: but was:<2>"));
+ Assertions.assertThat(e.getMessage()).isEqualTo("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] expected: but was:<2>");
}
try {
assertThat(table).column("var3").value().isNull();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] expected: but was:<2>"));
+ Assertions.assertThat(e.getMessage()).isEqualTo("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] expected: but was:<2>");
}
}
}
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java
index 4d583307..4a815855 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isBoolean()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsBoolean_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsBoolean_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_boolean() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_boolean() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_boolean() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_a_boolean() {
assertThat(changes).change().column("var1").valueAtEndPoint().isBoolean();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java
index f1551b72..1963d67c 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isBytes()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsBytes_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsBytes_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_bytes() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().table("test").build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_bytes() {
@Test
@NeedReload
public void should_fail_because_value_is_not_bytes() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_bytes() {
assertThat(changes).change().column("var1").valueAtEndPoint().isBytes();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java
index f9ddc273..21d4f2ee 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isDateTime()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsDateTime_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsDateTime_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_date_time() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_date_time() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_date_time() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_a_date_time() {
assertThat(changes).change().column("var1").valueAtEndPoint().isDateTime();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java
index 84296047..3b944690 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isDate()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsDate_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsDate_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_date() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_date() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_date() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_a_date() {
assertThat(changes).change().column("var1").valueAtEndPoint().isDate();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java
index 7f8789d9..1e1cf711 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isNumber()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsNumber_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsNumber_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_number() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_number() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_number() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_a_number() {
assertThat(changes).change().column("var2").valueAtEndPoint().isNumber();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " %n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java
index 1f67c697..6a1dd8fd 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isOfAnyTypeIn(org.assertj.db.type.ValueType...)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsOfAnyTypeIn_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueType_IsOfAnyTypeIn_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_of_any_of_types() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_of_any_of_types() {
@Test
@NeedReload
public void should_fail_because_value_is_not_of_any_of_types() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_not_of_any_of_types() {
assertThat(changes).change().column("var1").valueAtEndPoint().isOfAnyTypeIn(ValueType.BOOLEAN);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java
index d59e7677..5de77737 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java
@@ -30,6 +30,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isOfType(org.assertj.db.type.ValueType)} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsOfType_Test extends AbstractTest {
@@ -39,8 +40,8 @@ public class AssertOnValueType_IsOfType_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_of_type() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -59,8 +60,8 @@ public void test_is_of_type() {
@Test
@NeedReload
public void should_fail_because_value_is_not_of_type() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +69,7 @@ public void should_fail_because_value_is_not_of_type() {
assertThat(changes).change().column("var1").valueAtEndPoint().isOfType(ValueType.BOOLEAN);
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java
index bd67720a..9db7862b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isText()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsText_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsText_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_text() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_text() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_text() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_a_text() {
assertThat(changes).change().column("var1").valueAtEndPoint().isText();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java
index f2f09360..0b9627ee 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java
@@ -29,6 +29,7 @@
* {@link org.assertj.db.api.assertions.AssertOnValueType#isTime()} method.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class AssertOnValueType_IsTime_Test extends AbstractTest {
@@ -38,8 +39,8 @@ public class AssertOnValueType_IsTime_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_time() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +59,8 @@ public void test_is_time() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_time() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -67,7 +68,7 @@ public void should_fail_because_value_is_not_a_time() {
assertThat(changes).change().column("var1").valueAtEndPoint().isTime();
fail("An exception must be raised");
} catch (AssertionError e) {
- Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsUUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsUUID_Test.java
index 7ccc1627..36f58a3b 100644
--- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsUUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsUUID_Test.java
@@ -38,8 +38,8 @@ public class AssertOnValueType_IsUUID_Test extends AbstractTest {
@Test
@NeedReload
public void test_is_UUID() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var15 = 'F96EC595-CE91-47CC-9152-CCC8AC48AAD6' where var1 = 1");
changes.setEndPointNow();
@@ -58,8 +58,8 @@ public void test_is_UUID() {
@Test
@NeedReload
public void should_fail_because_value_is_not_a_UUID() {
- Table table = new Table(source, "test");
- Changes changes = new Changes(table).setStartPointNow();
+ Table table = assertDbConnection.table("test").build();
+ Changes changes = assertDbConnection.changes().tables(table).build().setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
@@ -68,7 +68,7 @@ public void should_fail_because_value_is_not_a_UUID() {
fail("An exception must be raised");
} catch (AssertionError e) {
Assertions.assertThat(e.getMessage()).isEqualTo(String.format(
- "[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n"
+ "[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test'] %n"
+ "Expecting:%n"
+ " <1>%n"
+ "to be of type%n"
diff --git a/src/test/java/org/assertj/db/api/assertions/BDDAssertions_Test.java b/src/test/java/org/assertj/db/api/assertions/BDDAssertions_Test.java
index 1f5cb668..1126658e 100644
--- a/src/test/java/org/assertj/db/api/assertions/BDDAssertions_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/BDDAssertions_Test.java
@@ -28,6 +28,7 @@
* Test on {@code BDDAssertions} methods.
*
* @author Régis Pouiller
+ * @author Julien Roy
*/
public class BDDAssertions_Test extends AbstractTest {
@@ -35,8 +36,8 @@ public class BDDAssertions_Test extends AbstractTest {
* This method tests the {@code then} method for {@code Table}.
*/
@Test
- public void test_then_for_table() throws Exception {
- Table table = new Table(source, "test");
+ public void test_then_for_table() {
+ Table table = assertDbConnection.table("test").build();
Assertions.assertThat(then(table)).isInstanceOf(TableAssert.class);
}
@@ -44,8 +45,8 @@ public void test_then_for_table() throws Exception {
* This method tests the {@code then} method for {@code Request}.
*/
@Test
- public void test_then_for_request() throws Exception {
- Request request = new Request(source, "select * from test");
+ public void test_then_for_request() {
+ Request request = assertDbConnection.request("select * from test").build();
Assertions.assertThat(then(request)).isInstanceOf(RequestAssert.class);
}
@@ -53,8 +54,8 @@ public void test_then_for_request() throws Exception {
* This method tests the {@code then} method for {@code Changes}.
*/
@Test
- public void test_then_for_changes() throws Exception {
- Changes changes = new Changes(source);
+ public void test_then_for_changes() {
+ Changes changes = assertDbConnection.changes().build();
Assertions.assertThat(then(changes)).isInstanceOf(ChangesAssert.class);
}
}
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsCreation_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsCreation_Test.java
index 91dd3975..ad5592c4 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsCreation_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsCreation_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
@@ -23,7 +22,6 @@
import org.assertj.db.type.ChangeType;
import org.assertj.db.type.DataType;
import org.assertj.db.type.Row;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnChangeType_IsCreation_Test extends AbstractTest {
@Test
public void test_is_creation() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint);
@@ -56,8 +53,7 @@ public void test_is_creation() throws Exception {
public void should_fail_because_type_of_change_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsDeletion_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsDeletion_Test.java
index aea2e669..74697fa5 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsDeletion_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsDeletion_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
@@ -23,7 +22,6 @@
import org.assertj.db.type.ChangeType;
import org.assertj.db.type.DataType;
import org.assertj.db.type.Row;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnChangeType_IsDeletion_Test extends AbstractTest {
@Test
public void test_is_deletion() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.DELETION, rowAtStartPoint, rowAtEndPoint);
@@ -56,8 +53,7 @@ public void test_is_deletion() throws Exception {
public void should_fail_because_type_of_change_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsModification_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsModification_Test.java
index 430c39ed..969c5fdd 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsModification_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsModification_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
@@ -23,7 +22,6 @@
import org.assertj.db.type.ChangeType;
import org.assertj.db.type.DataType;
import org.assertj.db.type.Row;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnChangeType_IsModification_Test extends AbstractTest {
@Test
public void test_is_modification() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint);
@@ -56,8 +53,7 @@ public void test_is_modification() throws Exception {
public void should_fail_because_type_of_change_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsOfType_Test.java
index 521ba803..cdb75314 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsOfType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType_IsOfType_Test.java
@@ -13,7 +13,6 @@
package org.assertj.db.api.assertions.impl;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.WritableAssertionInfo;
@@ -23,7 +22,6 @@
import org.assertj.db.type.ChangeType;
import org.assertj.db.type.DataType;
import org.assertj.db.type.Row;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnChangeType_IsOfType_Test extends AbstractTest {
@Test
public void test_is_of_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint);
@@ -56,8 +53,7 @@ public void test_is_of_type() throws Exception {
public void should_fail_because_type_of_change_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
Row rowAtStartPoint = getRow(null, null, null);
Row rowAtEndPoint = getRow(null, null, null);
Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass_IsOfClass_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass_IsOfClass_Test.java
index 2d79abc2..810302d9 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass_IsOfClass_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass_IsOfClass_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.exception.AssertJDBException;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnClass_IsOfClass_Test extends AbstractTest {
@Test
public void test_is_of_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, "test")));
TableAssert tableAssert2 = AssertionsOnColumnClass.isOfClass(tableAssert, info, list, String.class, false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -62,8 +59,7 @@ public void test_is_of_type() throws Exception {
public void should_fail_because_value_is_not_of_class() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, 8), getValue(null, "test")));
AssertionsOnColumnClass.isOfClass(tableAssert, info, list, String.class, false);
@@ -97,8 +93,7 @@ public void should_fail_because_value_is_not_of_class() throws Exception {
public void should_fail_because_value_is_not_of_type_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, 8)));
AssertionsOnColumnClass.isOfClass(tableAssert, info, list, String.class, true);
@@ -121,8 +116,7 @@ public void should_fail_because_value_is_not_of_type_with_lenience() throws Exce
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnClass.isOfClass(tableAssert, info, list, String.class, false);
@@ -145,8 +139,7 @@ public void should_fail_because_value_is_a_stringbuilder() throws Exception {
public void should_fail_because_class_value_is_null() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, "test")));
try {
AssertionsOnColumnClass.isOfClass(tableAssert, info, list, null, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Boolean_Test.java
index c1bb4ac1..a1297c6c 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Boolean_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnContent_ContainsValues_Boolean_Test extends Abstr
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, false), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnContent.containsValues(tableAssert, info, list, Boolean.TRUE,
Boolean.FALSE, null);
@@ -67,8 +64,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, false), getValue(null, null)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, null, null,
@@ -105,8 +101,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, false)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, Boolean.TRUE, Boolean.FALSE);
@@ -129,8 +124,7 @@ public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, false)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Bytes_Test.java
index 453da7df..50bfb49e 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Bytes_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnContent_ContainsValues_Bytes_Test extends Abstrac
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3})));
TableAssert tableAssert2 = AssertionsOnColumnContent.containsValues(tableAssert, info, list, new byte[]{0, 1}, new byte[]{2, 3});
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -61,8 +58,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3}), getValue(
null, null), getValue(null, new byte[]{2, 3})));
try {
@@ -82,8 +78,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, new byte[]{2, 3})));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, new byte[]{0, 1}, new byte[]{2, 3});
@@ -106,8 +101,7 @@ public void should_fail_because_one_value_is_not_a_bytes() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3})));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, new byte[]{0, 1}, new byte[]{2, 3}, new byte[]{2, 3});
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Character_Test.java
index d6d595a2..d1f0f890 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Character_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnContent_ContainsValues_Character_Test extends Abs
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 'T'), getValue(null, "t"), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnContent.containsValues(tableAssert, info, list, 'T',
't', null);
@@ -62,8 +59,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 'T'), getValue(null, "t"), getValue(null, null)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, null, null,
@@ -100,8 +96,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "T"), getValue(null, false)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, 'T', 't');
@@ -124,8 +119,7 @@ public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 'T'), getValue(null, 't')));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, 'T', 't', 'T');
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateTimeValue_Test.java
index 66d860d1..43139457 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateTimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Timestamp;
@@ -26,7 +25,6 @@
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateTimeValue;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -45,8 +43,7 @@ public class AssertionsOnColumnContent_ContainsValues_DateTimeValue_Test extends
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), getValue(
null, Timestamp.valueOf("2002-07-25 03:30:05")), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnContent.containsValues(tableAssert, info, list,
@@ -72,8 +69,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), getValue(
null, Timestamp.valueOf("2002-07-25 03:30:05")), getValue(null, null)));
try {
@@ -101,8 +97,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_date_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(
null, Timestamp.valueOf("2002-07-25 03:30:05"))));
try {
@@ -130,8 +125,7 @@ public void should_fail_because_one_value_is_not_a_date_time() throws Exception
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateValue_Test.java
index 55aae8f8..714c94bd 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_DateValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -25,7 +24,6 @@
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -43,8 +41,7 @@ public class AssertionsOnColumnContent_ContainsValues_DateValue_Test extends Abs
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2002-07-25")),
getValue(null, null)));
@@ -67,8 +64,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2002-07-25")),
getValue(null, null)));
@@ -97,8 +93,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"),
getValue(null, Date.valueOf("2002-07-25"))));
try {
@@ -124,8 +119,7 @@ public void should_fail_because_one_value_is_not_a_date() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2002-07-25"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Number_Test.java
index f5a49006..45cef88c 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Number_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnContent_ContainsValues_Number_Test extends Abstra
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 7), getValue(null, 8), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnContent.containsValues(tableAssert, info, list, 7,
8, null);
@@ -62,8 +59,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 7), getValue(null, 8), getValue(null, null)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, null, null,
@@ -99,8 +95,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, 8)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, 7, 8);
@@ -123,8 +118,7 @@ public void should_fail_because_one_value_is_not_a_number() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 7), getValue(null, 8)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, 8, 7, 7);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Object_Test.java
index f07b30f9..52846bff 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Object_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_Object_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnContent_ContainsValues_Object_Test extends Abstra
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Locale.FRENCH), getValue(null, Locale.ENGLISH), getValue(
null, Locale.FRENCH), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnContent.containsValues(tableAssert, info, list, Locale.FRENCH, Locale.ENGLISH, Locale.FRENCH, null);
@@ -67,8 +64,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Locale.FRENCH), getValue(null, Locale.ENGLISH), getValue(
null, Locale.FRENCH), getValue(null, null)));
try {
@@ -106,8 +102,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_of_class() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, Locale.FRENCH)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, Locale.FRENCH, Locale.FRENCH);
@@ -129,8 +124,7 @@ public void should_fail_because_one_value_is_not_of_class() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Locale.FRENCH), getValue(null, Boolean.FALSE)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, Locale.FRENCH, Boolean.FALSE, Boolean.FALSE);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_String_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_String_Test.java
index 0418bc32..84acaa94 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_String_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnContent_ContainsValues_String_Test extends Abstra
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test1"), getValue(null, "test2"), getValue(null,
"test1"), getValue(
null, null)));
@@ -61,8 +58,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test1"), getValue(null, "test2"), getValue(null,
"test1"), getValue(
null, null)));
@@ -100,8 +96,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, false)));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, "test1", "test2");
@@ -124,8 +119,7 @@ public void should_fail_because_one_value_is_not_a_text() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test1"), getValue(null, "test2")));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list, "test1", "test2", "test2");
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_TimeValue_Test.java
index 1fad791a..630fbaaa 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_TimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Time;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -43,8 +41,7 @@ public class AssertionsOnColumnContent_ContainsValues_TimeValue_Test extends Abs
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")),
getValue(null, Time.valueOf("03:30:05")), getValue(null,
null)));
@@ -67,8 +64,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")),
getValue(null, Time.valueOf("03:30:05")), getValue(null, null)));
try {
@@ -94,8 +90,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, Time.valueOf("03:30:05"))));
try {
AssertionsOnColumnContent.containsValues(tableAssert, info, list,
@@ -120,8 +115,7 @@ public void should_fail_because_one_value_is_not_a_time() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")), getValue(null, Time.valueOf(
"03:30:05"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_UUID_Test.java
index 0952741b..944b00c2 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent_ContainsValues_UUID_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnContent_ContainsValues_UUID_Test extends Abstract
@Test
public void test_contains_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -76,8 +73,7 @@ public void test_contains_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -134,8 +130,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_uuid() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))));
try {
@@ -159,8 +154,7 @@ public void should_fail_because_one_value_is_not_a_uuid() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Boolean_Test.java
index ea8102fd..93b940e4 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Boolean_Test.java
@@ -13,7 +13,6 @@
package org.assertj.db.api.assertions.impl;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnEquality_HasValues_Boolean_Test extends AbstractT
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, false), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Boolean.TRUE,
Boolean.FALSE, null);
@@ -56,8 +53,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, false), getValue(null, false)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Boolean.TRUE, Boolean.FALSE);
@@ -78,8 +74,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, false)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Boolean.TRUE, Boolean.FALSE);
@@ -102,8 +97,7 @@ public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, false)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Bytes_Test.java
index 50a5e228..d4444191 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Bytes_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnEquality_HasValues_Bytes_Test extends AbstractTes
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3})));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, new byte[]{0, 1},
new byte[]{2, 3});
@@ -56,8 +53,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3}), getValue(
null, null)));
try {
@@ -76,8 +72,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, new byte[]{2, 3})));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, new byte[]{0, 1}, new byte[]{2, 3});
@@ -100,8 +95,7 @@ public void should_fail_because_one_value_is_not_bytes() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3})));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, new byte[]{0, 1}, new byte[]{2, 3},
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Character_Test.java
index 94309097..b37bb6b4 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Character_Test.java
@@ -13,7 +13,6 @@
package org.assertj.db.api.assertions.impl;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnEquality_HasValues_Character_Test extends Abstrac
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 'T'), getValue(null, "t"), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 'T',
't', null);
@@ -56,8 +53,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 'T'), getValue(null, 'T')));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 't', 'T');
@@ -100,8 +96,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "T"), getValue(null, false)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 'T', 't');
@@ -124,8 +119,7 @@ public void should_fail_because_one_value_is_not_a_text() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 'T'), getValue(null, 't')));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 'T', 't', 'T');
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateTimeValue_Test.java
index dd5cc42d..5fa76dcb 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateTimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -27,7 +26,6 @@
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateTimeValue;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -46,8 +44,7 @@ public class AssertionsOnColumnEquality_HasValues_DateTimeValue_Test extends Abs
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")),
getValue(null, null)));
@@ -74,8 +71,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05"))));
@@ -113,8 +109,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_datetime() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, false),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05"))));
try {
@@ -140,8 +135,7 @@ public void should_fail_because_one_value_is_not_a_datetime() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateValue_Test.java
index 10ea509e..02f06564 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_DateValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -26,7 +25,6 @@
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -44,8 +42,7 @@ public class AssertionsOnColumnEquality_HasValues_DateValue_Test extends Abstrac
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")), getValue(
null, Date.valueOf("2002-07-25")), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, DateValue.of(2007, 12, 23),
@@ -66,8 +63,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")), getValue(null, Date.valueOf(
"2002-07-25"))));
@@ -103,8 +99,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, false), getValue(null, Date.valueOf("2002-07-25"))));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, DateValue.of(2007, 12, 23),
@@ -128,8 +123,7 @@ public void should_fail_because_one_value_is_not_a_date() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")), getValue(null, Date.valueOf(
"2002-07-25"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Number_Test.java
index 3953067a..bc69d0dc 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Number_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnEquality_HasValues_Number_Test extends AbstractTe
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 7), getValue(null, 8), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 7, 8, null);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -55,8 +52,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 8), getValue(null, 8)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 7, 8);
@@ -77,8 +73,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, 8)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 7, 8);
@@ -101,8 +96,7 @@ public void should_fail_because_one_value_is_not_a_number() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 7), getValue(null, 8)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, 7, 8, 8);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Object_Test.java
index 5e690973..08dcd5ca 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Object_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_Object_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnEquality_HasValues_Object_Test extends AbstractTe
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Locale.FRENCH), getValue(null, Locale.ENGLISH), getValue(
null, null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Locale.FRENCH, Locale.ENGLISH, null);
@@ -57,8 +54,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Locale.ENGLISH), getValue(null, Locale.ENGLISH)));
List list2 = new ArrayList<>(Arrays.asList(getValue(null, null), getValue(null, Locale.ENGLISH)));
try {
@@ -100,8 +96,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_of_class() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "other"), getValue(null, Locale.ENGLISH)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Locale.FRENCH, Locale.ENGLISH);
@@ -124,8 +119,7 @@ public void should_fail_because_one_value_is_not_of_class() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Locale.FRENCH), getValue(null, Locale.ENGLISH)));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, Locale.FRENCH, Locale.ENGLISH, Locale.ENGLISH);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_String_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_String_Test.java
index 8fc773c0..63dfef07 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_String_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -26,7 +25,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -44,8 +42,7 @@ public class AssertionsOnColumnEquality_HasValues_String_Test extends AbstractTe
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test1"), getValue(null, "test2"), getValue(null,
null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list, "test1", "test2", null);
@@ -75,8 +72,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, "test2")));
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, "test1", "test2");
@@ -144,8 +140,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, false), getValue(null, "test2")));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, "test1", "test2");
@@ -168,8 +163,7 @@ public void should_fail_because_one_value_is_not_a_text() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test1"), getValue(null, "test2")));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, "test1", "test2", "test3");
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_TimeValue_Test.java
index ea7d9532..c1a9cd2f 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_TimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Time;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -43,8 +41,7 @@ public class AssertionsOnColumnEquality_HasValues_TimeValue_Test extends Abstrac
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")), getValue(
null, Time.valueOf("03:30:05")), getValue(null, null)));
TableAssert tableAssert2 = AssertionsOnColumnEquality.hasValues(tableAssert, info, list,
@@ -59,8 +56,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")), getValue(null, Time.valueOf(
"03:30:05"))));
@@ -82,8 +78,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, false), getValue(null, Time.valueOf("03:30:05"))));
try {
AssertionsOnColumnEquality.hasValues(tableAssert, info, list, TimeValue.of(9, 1), TimeValue.of(3, 30, 5));
@@ -106,8 +101,7 @@ public void should_fail_because_one_value_is_not_a_time() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")), getValue(null, Time.valueOf(
"03:30:05"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_UUID_Test.java
index 4d96ded3..94af6d13 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality_HasValues_UUID_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnEquality_HasValues_UUID_Test extends AbstractTest
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -64,8 +61,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_values_are_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -90,8 +86,7 @@ public void should_fail_because_values_are_different() throws Exception {
public void should_fail_because_one_value_is_not_a_uuid() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, false),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))));
try {
@@ -117,8 +112,7 @@ public void should_fail_because_one_value_is_not_a_uuid() throws Exception {
public void should_fail_because_the_number_of_values_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))));
try {
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName_HasColumnName_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName_HasColumnName_Test.java
index 114a8df1..a0d62313 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName_HasColumnName_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName_HasColumnName_Test.java
@@ -12,13 +12,11 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
-import org.assertj.db.type.Table;
import org.assertj.db.type.lettercase.LetterCase;
import org.junit.Test;
@@ -36,8 +34,7 @@ public class AssertionsOnColumnName_HasColumnName_Test {
@Test
public void test_has_column_name() {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnName.hasColumnName(tableAssert, info, "test", "test", LetterCase.COLUMN_DEFAULT);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
}
@@ -49,8 +46,7 @@ public void test_has_column_name() {
public void should_fail_because_column_name_is_different() {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnName.hasColumnName(tableAssert, info, "test1", "test", LetterCase.COLUMN_DEFAULT);
fail("An exception must be raised");
@@ -70,8 +66,7 @@ public void should_fail_because_column_name_is_different() {
public void should_fail_because_column_name_is_null() {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnName.hasColumnName(tableAssert, info, "test", null, LetterCase.COLUMN_DEFAULT);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass_IsOfClass_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass_IsOfClass_Test.java
index d7aaf232..8fcf525b 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass_IsOfClass_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass_IsOfClass_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
@@ -20,7 +19,6 @@
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.exception.AssertJDBException;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -37,8 +35,7 @@ public class AssertionsOnColumnOfChangeClass_IsOfClass_Test extends AbstractTest
@Test
public void test_is_of_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeClass.isOfClass(tableAssert, info,
getValue(null, "test"),
getValue(null, "test"),
@@ -68,8 +65,7 @@ public void test_is_of_type() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeClass.isOfClass(tableAssert, info,
getValue(null, 8),
@@ -120,8 +116,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeClass.isOfClass(tableAssert, info,
getValue(null, "test"),
@@ -172,8 +167,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeClass.isOfClass(tableAssert, info,
getValue(null, new StringBuilder("test")),
@@ -213,8 +207,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeClass.isOfClass(tableAssert, info,
getValue(null, "test"),
@@ -254,8 +247,7 @@ public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws E
public void should_fail_because_class_value_is_null() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeClass.isOfClass(tableAssert, info,
getValue(null, "test"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java
index 2d6d6556..5e4f26c3 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_Boolean_Test exten
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, true),
getValue(null, true),
@@ -52,8 +49,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, false),
@@ -76,8 +72,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, false),
@@ -100,8 +95,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java
index 775a4959..96cea9d1 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_Bytes_Test extends
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, new byte[]{0, 1}),
getValue(null, new byte[]{0, 1}), new byte[]{0, 1});
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -50,8 +47,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, new byte[]{0, 1}), getValue(
null, new byte[]{2, 3}),
@@ -70,8 +66,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, new byte[]{0, 1}), getValue(
null, new byte[]{2, 3}),
@@ -90,8 +85,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, "other"), getValue(null, new byte[]{2, 3}), new byte[]{0, 1});
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Character_Test.java
index 54f8d74b..531f6101 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Character_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_Character_Test ext
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 'T'),
getValue(null, 'T'),
@@ -67,8 +64,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 't'),
@@ -117,8 +113,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 'T'),
@@ -167,8 +162,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "T"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java
index 30163e10..44f1a303 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -24,7 +23,6 @@
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateTimeValue;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Timestamp.valueOf(
"2007-12-23 09:01:00")),
@@ -67,8 +64,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")),
@@ -104,8 +100,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
@@ -141,8 +136,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_date_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java
index 2a704ca5..67feaf69 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -23,7 +22,6 @@
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_DateValue_Test ext
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2007-12-23")),
@@ -61,8 +58,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
@@ -98,8 +94,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
@@ -135,8 +130,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Number_Test.java
index 1005cffe..a691345d 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Number_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_Number_Test extend
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 1),
getValue(null, 1),
@@ -52,8 +49,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 0),
@@ -75,8 +71,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 1),
@@ -98,8 +93,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Object_Test.java
index b7cecb54..f48c0205 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Object_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_Object_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.Locale;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_Object_Test extend
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Locale.FRENCH),
getValue(null, Locale.FRENCH),
@@ -59,8 +56,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Locale.ENGLISH),
@@ -96,8 +92,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Locale.FRENCH),
@@ -120,8 +115,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_object() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_String_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_String_Test.java
index 7f090cab..712cf2fc 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_String_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_String_Test extend
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "test1"),
getValue(null, "test1"),
@@ -76,8 +73,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "test1"),
@@ -152,8 +148,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "test1"),
@@ -228,8 +223,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, false),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java
index 23f5f2f7..fbd6a967 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java
@@ -12,19 +12,17 @@
*/
package org.assertj.db.api.assertions.impl;
+import static org.junit.Assert.fail;
+
+import java.sql.Time;
+
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.junit.Test;
-import java.sql.Time;
-
-import static org.assertj.db.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
/**
* Tests on {@link org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeEquality} class :
* {@link org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeEquality#hasValues(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.Value, TimeValue)} method.
@@ -39,8 +37,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_TimeValue_Test ext
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
getValue(null, Time.valueOf("09:01:00")),
@@ -55,8 +52,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Time.valueOf("09:01:05")),
@@ -79,8 +75,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
@@ -103,8 +98,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_UUID_Test.java
index 6631172e..dbccede9 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_One_UUID_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.UUID;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_One_UUID_Test extends
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, UUID.fromString(
"30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -57,8 +54,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, UUID.fromString(
@@ -82,8 +78,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -107,8 +102,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_uuid() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java
index cc7f250b..6669cf90 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_Boolean_Test exten
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, true),
getValue(null, true),
@@ -53,8 +50,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, false),
@@ -77,8 +73,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, false),
@@ -101,8 +96,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java
index e77f1d8b..e79a694e 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_Bytes_Test extends
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, new byte[]{0, 1}),
getValue(null, new byte[]{2, 3}),
@@ -53,8 +50,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, new byte[]{0, 1}),
@@ -74,8 +70,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, new byte[]{0, 1}),
@@ -95,8 +90,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Character_Test.java
index a8441fb1..63e3a1e4 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Character_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Character_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_Character_Test ext
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 'T'),
getValue(null, "T"),
@@ -53,8 +50,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 't'),
@@ -90,8 +86,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 'T'),
@@ -127,8 +122,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, true),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java
index 1efec3b0..f53409da 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -24,7 +23,6 @@
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateTimeValue;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Timestamp.valueOf(
"2007-12-23 09:01:00")),
@@ -69,8 +66,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")),
@@ -108,8 +104,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
@@ -147,8 +142,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_date_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java
index d15dd74d..08f5cdb2 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -23,7 +22,6 @@
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
import org.assertj.db.type.DateValue;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_DateValue_Test ext
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2002-07-25")),
@@ -62,8 +59,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
@@ -99,8 +95,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
@@ -136,8 +131,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Number_Test.java
index 614a1c08..540ce0b4 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Number_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Number_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_Number_Test extend
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 1),
getValue(null, 2), 1, 2);
@@ -51,8 +48,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 1),
@@ -74,8 +70,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, 1),
@@ -97,8 +92,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Objects_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Objects_Test.java
index d774ad1c..24bf9426 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Objects_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_Objects_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.Locale;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_Objects_Test exten
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, Locale.FRENCH),
getValue(null, Locale.ENGLISH), Locale.FRENCH,
Locale.ENGLISH);
@@ -61,8 +58,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, Locale.FRENCH),
getValue(null, Locale.ENGLISH),
@@ -120,8 +116,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, Locale.FRENCH), getValue(null,
Locale.ENGLISH), Locale.FRENCH, Locale.FRENCH);
@@ -142,8 +137,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_object() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info, getValue(null, "other"), getValue(null, Locale.ENGLISH), Locale.FRENCH, Locale.ENGLISH);
fail("An exception must be raised");
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_String_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_String_Test.java
index 27b98766..1ee9d7f8 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_String_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_String_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -40,8 +38,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_String_Test extend
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "test1"), getValue(null,
"test2"),
@@ -75,8 +72,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "test1"), getValue(null, "test2"),
@@ -149,8 +145,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "test1"), getValue(null, "test1"),
@@ -223,8 +218,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, false), getValue(null, "test2"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java
index cab0b904..13a43441 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Time;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.TimeValue;
import org.junit.Test;
@@ -39,8 +37,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test ext
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
getValue(null, Time.valueOf("03:30:05")),
@@ -55,8 +52,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Time.valueOf("09:01:05")),
@@ -79,8 +75,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
@@ -103,8 +98,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java
index 08559514..54f5235e 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.UUID;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeEquality_HasValues_Two_UUID_Test extends
@Test
public void test_has_values() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, UUID.fromString(
"30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -57,8 +54,7 @@ public void test_has_values() throws Exception {
public void should_fail_because_value_at_start_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")),
@@ -85,8 +81,7 @@ public void should_fail_because_value_at_start_point_is_different() throws Excep
public void should_fail_because_value_at_end_point_is_different() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")),
@@ -113,8 +108,7 @@ public void should_fail_because_value_at_end_point_is_different() throws Excepti
public void should_fail_because_one_value_is_not_a_uuid() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeEquality.hasValues(tableAssert, info,
getValue(null, "other"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBoolean_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBoolean_Test.java
index ff1291f1..9fafe1db 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBoolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBoolean_Test.java
@@ -12,16 +12,14 @@
*/
package org.assertj.db.api.assertions.impl;
+import static org.junit.Assert.fail;
+
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
-import static org.assertj.db.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
/**
* Tests on {@link AssertionsOnColumnOfChangeType} class :
* {@link AssertionsOnColumnOfChangeType#isBoolean(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.Value, boolean)} method.
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeType_IsBoolean_Test extends AbstractTest
@Test
public void test_is_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isBoolean(tableAssert, info, getValue(null, true), getValue(
null, true), false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -54,8 +51,7 @@ public void test_is_boolean() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBoolean(tableAssert, info,
getValue(null, "test"), getValue(null, true), false);
@@ -78,8 +74,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBoolean(tableAssert, info,
getValue(null, false), getValue(null, "test"), false);
@@ -102,8 +97,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBoolean(tableAssert, info,
getValue(null, new StringBuilder("test")), getValue(null, true), false);
@@ -126,8 +120,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBoolean(tableAssert, info,
getValue(null, false), getValue(null, new StringBuilder("test")), false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBytes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBytes_Test.java
index f4040669..21ba0f82 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsBytes_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeType_IsBytes_Test extends AbstractTest {
@Test
public void test_is_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isBytes(tableAssert, info, getValue(null, new byte[]{0, 1}), getValue(
null, new byte[]{2, 3}), false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -55,8 +52,7 @@ public void test_is_bytes() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBytes(tableAssert, info,
getValue(null, "test"),
@@ -80,8 +76,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBytes(tableAssert, info,
getValue(null, new byte[]{2, 3}),
@@ -105,8 +100,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBytes(tableAssert, info,
getValue(null, new StringBuilder("test")),
@@ -130,8 +124,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isBytes(tableAssert, info,
getValue(null, new byte[]{2, 3}),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDateTime_Test.java
index b43d4add..eb7b802e 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDateTime_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Timestamp;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeType_IsDateTime_Test extends AbstractTest
@Test
public void test_is_date_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isDateTime(tableAssert, info,
getValue(null, Timestamp.valueOf(
"2007-12-23 09:01:00")),
@@ -63,8 +60,7 @@ public void test_is_date_time() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDateTime(tableAssert, info,
getValue(null, "test"),
@@ -88,8 +84,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDateTime(tableAssert, info,
getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
@@ -113,8 +108,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDateTime(tableAssert, info,
getValue(null, new StringBuilder("test")),
@@ -139,8 +133,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDateTime(tableAssert, info,
getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDate_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDate_Test.java
index f65afba9..2c10740f 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsDate_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeType_IsDate_Test extends AbstractTest {
@Test
public void test_is_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isDate(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2002-07-25")), false);
@@ -60,8 +57,7 @@ public void test_is_date() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDate(tableAssert, info,
getValue(null, "test"),
@@ -85,8 +81,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDate(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
@@ -110,8 +105,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDate(tableAssert, info,
getValue(null, new StringBuilder("test")),
@@ -135,8 +129,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isDate(tableAssert, info,
getValue(null, Date.valueOf("2007-12-23")),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsNumber_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsNumber_Test.java
index 6a315543..337f5f02 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsNumber_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsNumber_Test.java
@@ -12,16 +12,14 @@
*/
package org.assertj.db.api.assertions.impl;
+import static org.junit.Assert.fail;
+
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
-import static org.assertj.db.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
/**
* Tests on {@link org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeType} class :
* {@link org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeType#isNumber(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.Value, boolean)} method.
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeType_IsNumber_Test extends AbstractTest {
@Test
public void test_is_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isNumber(tableAssert, info, getValue(null, 8), getValue(
null, 9), false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -54,8 +51,7 @@ public void test_is_number() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isNumber(tableAssert, info,
getValue(null, "test"), getValue(null, 8), false);
@@ -78,8 +74,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isNumber(tableAssert, info,
getValue(null, 8), getValue(null, "test"), false);
@@ -102,8 +97,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isNumber(tableAssert, info,
getValue(null, new StringBuilder("test")), getValue(null, 8), false);
@@ -126,8 +120,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isNumber(tableAssert, info,
getValue(null, 8), getValue(null, new StringBuilder("test")), false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfAnyOfTypes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfAnyOfTypes_Test.java
index 19019620..5a67ae63 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfAnyOfTypes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfAnyOfTypes_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.Locale;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.ValueType;
import org.junit.Test;
@@ -39,8 +37,7 @@ public class AssertionsOnColumnOfChangeType_IsOfAnyOfTypes_Test extends Abstract
@Test
public void test_is_of_any_of_types() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isOfAnyTypeIn(tableAssert, info, getValue(null, "test"),
getValue(null, "test"),
ValueType.TEXT);
@@ -64,8 +61,7 @@ public void test_is_of_any_of_types() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfAnyTypeIn(tableAssert, info,
getValue(null, 8), getValue(null, "test"),
@@ -117,8 +113,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfAnyTypeIn(tableAssert, info,
getValue(null, "test"),
@@ -170,8 +165,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfAnyTypeIn(tableAssert, info,
getValue(null, new StringBuilder("test")),
@@ -195,8 +189,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfAnyTypeIn(tableAssert, info,
getValue(null, "test"),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfType_Test.java
index 08f60803..3ef38267 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsOfType_Test.java
@@ -12,19 +12,17 @@
*/
package org.assertj.db.api.assertions.impl;
+import static org.junit.Assert.fail;
+
+import java.util.Locale;
+
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.ValueType;
import org.junit.Test;
-import java.util.Locale;
-
-import static org.assertj.db.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
/**
* Tests on {@link AssertionsOnColumnOfChangeType} class :
* {@link AssertionsOnColumnOfChangeType#isOfType(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.Value, org.assertj.db.type.ValueType, boolean)} method.
@@ -39,8 +37,7 @@ public class AssertionsOnColumnOfChangeType_IsOfType_Test extends AbstractTest {
@Test
public void test_is_of_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isOfType(tableAssert, info,
getValue(null, "test"),
getValue(null, "test"), ValueType.TEXT, false);
@@ -62,8 +59,7 @@ public void test_is_of_type() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfType(tableAssert, info,
getValue(null, 8), getValue(null, "test"), ValueType.TEXT, false);
@@ -112,8 +108,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfType(tableAssert, info,
getValue(null, "test"), getValue(null, 8), ValueType.TEXT, false);
@@ -162,8 +157,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfType(tableAssert, info,
getValue(null, new StringBuilder("test")), getValue(null, "test"), ValueType.TEXT, false);
@@ -186,8 +180,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isOfType(tableAssert, info,
getValue(null, "test"), getValue(null, new StringBuilder("test")), ValueType.TEXT, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsText_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsText_Test.java
index e960fb9e..d1178652 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsText_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsText_Test.java
@@ -12,14 +12,12 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -36,8 +34,7 @@ public class AssertionsOnColumnOfChangeType_IsText_Test extends AbstractTest {
@Test
public void test_is_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isText(tableAssert, info, getValue(null, "test"), getValue(
null, "test"), false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -55,8 +52,7 @@ public void test_is_text() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isText(tableAssert, info,
getValue(null, true), getValue(null, "test"), false);
@@ -79,8 +75,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isText(tableAssert, info,
getValue(null, "test"), getValue(null, false), false);
@@ -103,8 +98,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isTime(tableAssert, info,
getValue(null, new StringBuilder("test")), getValue(null, "test"), false);
@@ -127,8 +121,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isText(tableAssert, info,
getValue(null, "test"), getValue(null, new StringBuilder("test")), false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsTime_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsTime_Test.java
index d6d81e86..a52904f0 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType_IsTime_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Time;
@@ -21,7 +20,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.junit.Test;
/**
@@ -38,8 +36,7 @@ public class AssertionsOnColumnOfChangeType_IsTime_Test extends AbstractTest {
@Test
public void test_is_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
TableAssert tableAssert2 = AssertionsOnColumnOfChangeType.isTime(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
getValue(null, Time.valueOf("09:01:00")), false);
@@ -61,8 +58,7 @@ public void test_is_time() throws Exception {
public void should_fail_because_value_at_start_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isTime(tableAssert, info,
getValue(null, "test"),
@@ -86,8 +82,7 @@ public void should_fail_because_value_at_start_point_have_different_type() throw
public void should_fail_because_value_at_end_point_have_different_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isTime(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
@@ -111,8 +106,7 @@ public void should_fail_because_value_at_end_point_have_different_type() throws
public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isTime(tableAssert, info,
getValue(null, new StringBuilder("test")),
@@ -136,8 +130,7 @@ public void should_fail_because_value_at_start_point_is_a_stringbuilder() throws
public void should_fail_because_value_at_end_point_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
AssertionsOnColumnOfChangeType.isTime(tableAssert, info,
getValue(null, Time.valueOf("09:01:00")),
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBoolean_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBoolean_Test.java
index 17873629..7e4c2053 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBoolean_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBoolean_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnType_IsBoolean_Test extends AbstractTest {
@Test
public void test_is_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, true)));
TableAssert tableAssert2 = AssertionsOnColumnType.isBoolean(tableAssert, info, list, false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -61,8 +58,7 @@ public void test_is_boolean() throws Exception {
public void should_fail_because_value_is_not_a_boolean() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, true)));
AssertionsOnColumnType.isBoolean(tableAssert, info, list, false);
@@ -85,8 +81,7 @@ public void should_fail_because_value_is_not_a_boolean() throws Exception {
public void should_fail_because_value_is_not_a_boolean_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, false), getValue(null, "test")));
AssertionsOnColumnType.isBoolean(tableAssert, info, list, false);
@@ -109,8 +104,7 @@ public void should_fail_because_value_is_not_a_boolean_with_lenience() throws Ex
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isBoolean(tableAssert, info, list, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBytes_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBytes_Test.java
index 7cd7fccd..0e6a6902 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBytes_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsBytes_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnType_IsBytes_Test extends AbstractTest {
@Test
public void test_is_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{0, 1}), getValue(null, new byte[]{2, 3})));
TableAssert tableAssert2 = AssertionsOnColumnType.isBytes(tableAssert, info, list, false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -61,8 +58,7 @@ public void test_is_bytes() throws Exception {
public void should_fail_because_value_is_not_bytes() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, new byte[]{2, 3})));
AssertionsOnColumnType.isBytes(tableAssert, info, list, false);
@@ -85,8 +81,7 @@ public void should_fail_because_value_is_not_bytes() throws Exception {
public void should_fail_because_value_is_not_bytes_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new byte[]{2, 3}), getValue(null, "test")));
AssertionsOnColumnType.isBytes(tableAssert, info, list, false);
@@ -109,8 +104,7 @@ public void should_fail_because_value_is_not_bytes_with_lenience() throws Except
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isBytes(tableAssert, info, list, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDateTime_Test.java
index caa8faa3..99ca8872 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDateTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDateTime_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Timestamp;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnType_IsDateTime_Test extends AbstractTest {
@Test
public void test_is_date_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05"))));
TableAssert tableAssert2 = AssertionsOnColumnType.isDateTime(tableAssert, info, list, false);
@@ -65,8 +62,7 @@ public void test_is_date_time() throws Exception {
public void should_fail_because_value_is_not_a_date_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"),
getValue(null, Timestamp.valueOf("2002-07-25 03:30:05"))));
@@ -90,8 +86,7 @@ public void should_fail_because_value_is_not_a_date_time() throws Exception {
public void should_fail_because_value_is_not_a_date_time_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")),
getValue(null, "test")));
@@ -115,8 +110,7 @@ public void should_fail_because_value_is_not_a_date_time_with_lenience() throws
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")),
getValue(null, true)));
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDate_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDate_Test.java
index 9e04a7ec..96e4f5c3 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDate_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsDate_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Date;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnType_IsDate_Test extends AbstractTest {
@Test
public void test_is_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")),
getValue(null, Date.valueOf("2002-07-25"))));
TableAssert tableAssert2 = AssertionsOnColumnType.isDate(tableAssert, info, list, false);
@@ -65,8 +62,7 @@ public void test_is_date() throws Exception {
public void should_fail_because_value_is_not_a_date() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, Date.valueOf("2002-07-25"))));
AssertionsOnColumnType.isDate(tableAssert, info, list, false);
@@ -89,8 +85,7 @@ public void should_fail_because_value_is_not_a_date() throws Exception {
public void should_fail_because_value_is_not_a_date_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, Date.valueOf("2007-12-23")), getValue(null, "test")));
AssertionsOnColumnType.isDate(tableAssert, info, list, false);
@@ -113,8 +108,7 @@ public void should_fail_because_value_is_not_a_date_with_lenience() throws Excep
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isDate(tableAssert, info, list, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsNumber_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsNumber_Test.java
index 5bc64f72..29bf7a52 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsNumber_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsNumber_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnType_IsNumber_Test extends AbstractTest {
@Test
public void test_is_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, 8), getValue(null, 9)));
TableAssert tableAssert2 = AssertionsOnColumnType.isNumber(tableAssert, info, list, false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -61,8 +58,7 @@ public void test_is_number() throws Exception {
public void should_fail_because_value_is_not_a_number() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, 8)));
AssertionsOnColumnType.isNumber(tableAssert, info, list, false);
@@ -85,8 +81,7 @@ public void should_fail_because_value_is_not_a_number() throws Exception {
public void should_fail_because_value_is_not_a_number_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, 8), getValue(null, "test")));
AssertionsOnColumnType.isNumber(tableAssert, info, list, false);
@@ -109,8 +104,7 @@ public void should_fail_because_value_is_not_a_number_with_lenience() throws Exc
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isNumber(tableAssert, info, list, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfAnyTypeIn_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfAnyTypeIn_Test.java
index 7b83213b..5d1dc65c 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfAnyTypeIn_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfAnyTypeIn_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.assertj.db.type.ValueType;
import org.junit.Test;
@@ -43,8 +41,7 @@ public class AssertionsOnColumnType_IsOfAnyTypeIn_Test extends AbstractTest {
@Test
public void test_is_of_any_of_types() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, "test")));
TableAssert tableAssert2 = AssertionsOnColumnType.isOfAnyTypeIn(tableAssert, info, list,
ValueType.TEXT);
@@ -65,8 +62,7 @@ public void test_is_of_any_of_types() throws Exception {
public void should_fail_because_value_is_not_of_any_of_types() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, 8), getValue(null, "test")));
AssertionsOnColumnType.isOfAnyTypeIn(tableAssert, info, list, ValueType.TEXT, ValueType.DATE);
@@ -115,8 +111,7 @@ public void should_fail_because_value_is_not_of_any_of_types() throws Exception
public void should_fail_because_value_is_not_of_any_of_types_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, 8)));
AssertionsOnColumnType.isOfAnyTypeIn(tableAssert, info, list, ValueType.TEXT, ValueType.DATE);
@@ -139,8 +134,7 @@ public void should_fail_because_value_is_not_of_any_of_types_with_lenience() thr
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isOfAnyTypeIn(tableAssert, info, list, ValueType.TEXT, ValueType.DATE);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfType_Test.java
index abcac28f..68b74d3a 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfType_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsOfType_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.assertj.db.type.ValueType;
import org.junit.Test;
@@ -43,8 +41,7 @@ public class AssertionsOnColumnType_IsOfType_Test extends AbstractTest {
@Test
public void test_is_of_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, "test")));
TableAssert tableAssert2 = AssertionsOnColumnType.isOfType(tableAssert, info, list, ValueType.TEXT, false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -63,8 +60,7 @@ public void test_is_of_type() throws Exception {
public void should_fail_because_value_is_not_of_type() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, 8), getValue(null, "test")));
AssertionsOnColumnType.isOfType(tableAssert, info, list, ValueType.TEXT, false);
@@ -113,8 +109,7 @@ public void should_fail_because_value_is_not_of_type() throws Exception {
public void should_fail_because_value_is_not_of_type_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, 8)));
AssertionsOnColumnType.isOfType(tableAssert, info, list, ValueType.TEXT, false);
@@ -137,8 +132,7 @@ public void should_fail_because_value_is_not_of_type_with_lenience() throws Exce
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isOfType(tableAssert, info, list, ValueType.TEXT, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsText_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsText_Test.java
index afc6ff87..1e73827b 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsText_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsText_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.ArrayList;
@@ -23,7 +22,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -41,8 +39,7 @@ public class AssertionsOnColumnType_IsText_Test extends AbstractTest {
@Test
public void test_is_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, "test")));
TableAssert tableAssert2 = AssertionsOnColumnType.isText(tableAssert, info, list, false);
Assertions.assertThat(tableAssert2).isSameAs(tableAssert);
@@ -61,8 +58,7 @@ public void test_is_text() throws Exception {
public void should_fail_because_value_is_not_a_text() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, true), getValue(null, "test")));
AssertionsOnColumnType.isText(tableAssert, info, list, false);
@@ -85,8 +81,7 @@ public void should_fail_because_value_is_not_a_text() throws Exception {
public void should_fail_because_value_is_not_a_text_with_lenience() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, "test"), getValue(null, false)));
AssertionsOnColumnType.isText(tableAssert, info, list, false);
@@ -109,8 +104,7 @@ public void should_fail_because_value_is_not_a_text_with_lenience() throws Excep
public void should_fail_because_value_is_a_stringbuilder() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List list = new ArrayList<>(Arrays.asList(getValue(null, new StringBuilder("test")), getValue(null, true)));
AssertionsOnColumnType.isText(tableAssert, info, list, false);
diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsTime_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsTime_Test.java
index 3b836f87..09a20788 100644
--- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsTime_Test.java
+++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType_IsTime_Test.java
@@ -12,7 +12,6 @@
*/
package org.assertj.db.api.assertions.impl;
-import static org.assertj.db.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.sql.Time;
@@ -24,7 +23,6 @@
import org.assertj.core.api.WritableAssertionInfo;
import org.assertj.db.api.TableAssert;
import org.assertj.db.common.AbstractTest;
-import org.assertj.db.type.Table;
import org.assertj.db.type.Value;
import org.junit.Test;
@@ -42,8 +40,7 @@ public class AssertionsOnColumnType_IsTime_Test extends AbstractTest {
@Test
public void test_is_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
List list = new ArrayList<>(Arrays.asList(getValue(null, Time.valueOf("09:01:00")),
getValue(null, Time.valueOf("09:01:00"))));
TableAssert tableAssert2 = AssertionsOnColumnType.isTime(tableAssert, info, list, false);
@@ -65,8 +62,7 @@ public void test_is_time() throws Exception {
public void should_fail_because_value_is_not_a_time() throws Exception {
WritableAssertionInfo info = new WritableAssertionInfo();
info.description("description");
- Table table = new Table();
- TableAssert tableAssert = assertThat(table);
+ TableAssert tableAssert = new TableAssert(null);
try {
List