diff --git a/pom.xml b/pom.xml
index d2856749..855ae6c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
assertj-db
- 3.0.1
+ 3.0.2-SNAPSHOTAssertJ-DB - Assertions for databaseAssertJ-DB - Rich and fluent assertions for testing with database
diff --git a/src/main/java/org/assertj/db/type/Changes.java b/src/main/java/org/assertj/db/type/Changes.java
index c79eddf1..d279e3dc 100644
--- a/src/main/java/org/assertj/db/type/Changes.java
+++ b/src/main/java/org/assertj/db/type/Changes.java
@@ -24,6 +24,9 @@
import java.util.List;
import java.util.function.Consumer;
+import org.assertj.core.api.AssertProvider;
+import org.assertj.db.api.Assertions;
+import org.assertj.db.api.ChangesAssert;
import org.assertj.db.exception.AssertJDBException;
import org.assertj.db.util.ChangeComparator;
@@ -85,7 +88,7 @@
* @author Régis Pouiller
* @author Julien Roy
*/
-public class Changes extends AbstractDbElement {
+public class Changes extends AbstractDbElement implements AssertProvider {
/**
* The list of the tables.
@@ -679,4 +682,16 @@ public Changes build() {
return new Changes(this.connectionProvider);
}
}
+
+ /**
+ * Makes both AssertJ Core and AssertJ DB assertions able to coexist in the same class with {@link org.assertj.core.api.Assertions org.assertj.core.api.Assertions.assertThat} as the only import necessary.
+ * Also works for both BDDAssertions.then static methods from AssertJ Core and AssertJ DB.
+ *
+ * @see org.assertj.core.api.Assertions#assertThat(AssertProvider) <T> org.assertj.core.api.Assertions.assertThat(AssertProvider<T> component)
+ * @see org.assertj.core.api.BDDAssertions#then(AssertProvider) <T> org.assertj.core.api.BDDAssertions.then(AssertProvider<T> component)
+ */
+ @Override
+ public ChangesAssert assertThat() {
+ return Assertions.assertThat(this);
+ }
}
diff --git a/src/main/java/org/assertj/db/type/Request.java b/src/main/java/org/assertj/db/type/Request.java
index 5fade7a8..3123700f 100644
--- a/src/main/java/org/assertj/db/type/Request.java
+++ b/src/main/java/org/assertj/db/type/Request.java
@@ -21,6 +21,9 @@
import java.util.Arrays;
import java.util.List;
+import org.assertj.core.api.AssertProvider;
+import org.assertj.core.api.Assertions;
+import org.assertj.db.api.RequestAssert;
import org.assertj.db.type.lettercase.LetterCase;
/**
@@ -62,7 +65,7 @@
* @author Régis Pouiller
* @author Julien Roy
*/
-public class Request extends AbstractDbData {
+public class Request extends AbstractDbData implements AssertProvider {
/**
* SQL request to get the values.
@@ -226,4 +229,16 @@ public Request build() {
return new Request(this.connectionProvider, this.request, this.parameters, this.pksName);
}
}
+
+ /**
+ * Makes both AssertJ Core and AssertJ DB assertions able to coexist in the same class with {@link org.assertj.core.api.Assertions org.assertj.core.api.Assertions.assertThat} as the only import necessary.
+ * Also works for both BDDAssertions.then static methods from AssertJ Core and AssertJ DB.
implements AssertProvider {
/**
* The name of the table.
@@ -726,4 +729,16 @@ public enum OrderType {
DESC
}
}
+
+ /**
+ * Makes both AssertJ Core and AssertJ DB assertions able to coexist in the same class with {@link org.assertj.core.api.Assertions org.assertj.core.api.Assertions.assertThat} as the only import necessary.
+ * Also works for both BDDAssertions.then static methods from AssertJ Core and AssertJ DB.