Skip to content

Commit 084fba7

Browse files
committed
AssertJ DB - Document assertThat from AssertJ Core is directly usable
1 parent d566aa4 commit 084fba7

File tree

5 files changed

+79
-9
lines changed

5 files changed

+79
-9
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ javacRelease = 8
88

99
assertjVersion = 3.27.7
1010
assertjJodaTimeVersion = 2.2.0
11-
assertjDbVersion = 3.0.1
11+
assertjDbVersion = 3.0.2
1212
ota4jVersion = 1.2.0
1313

1414
defaultBuiltBy = AssertJ Team

src/docs/asciidoc/user-guide/assertj-db-concepts.adoc

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,15 @@ There are examples of the navigation in {assertj-examples-github}/blob/main/asse
753753
[[assertj-db-concepts-tableorrequestasroot]]
754754
===== With a Table or a Request as root
755755

756-
The `assertThat(...)` static method of `org.assertj.db.api.Assertions` allows to create a root assertion on a https://www.javadoc.io/doc/org.assertj/assertj-db/latest/org/assertj/db/type/Table.html[Table].
756+
The `assertThat(...)` static method of `Assertions` allows to create a root assertion on a https://www.javadoc.io/doc/org.assertj/assertj-db/latest/org/assertj/db/type/Table.html[Table].
757757

758758
[source,java]
759759
----
760-
import static org.assertj.db.api.Assertions.assertThat;
760+
// From v3.0.2
761+
import static org.assertj.core.api.Assertions.assertThat;
762+
763+
// For versions <= 3.0.1 :
764+
// import static org.assertj.db.api.Assertions.assertThat;
761765
762766
assertThat(table)...
763767
----
@@ -766,7 +770,11 @@ or on a https://www.javadoc.io/doc/org.assertj/assertj-db/latest/org/assertj/db/
766770

767771
[source,java]
768772
----
769-
import static org.assertj.db.api.Assertions.assertThat;
773+
// From v3.0.2
774+
import static org.assertj.core.api.Assertions.assertThat;
775+
776+
// For versions <= 3.0.1 :
777+
// import static org.assertj.db.api.Assertions.assertThat;
770778
771779
assertThat(request)...
772780
----
@@ -794,12 +802,16 @@ More details on this concept in assertj-db-features-highlight.html#tableorreques
794802
[[assertj-db-concepts-changesasroot]]
795803
===== With Changes as root
796804

797-
The `assertThat(...)` static method of `org.assertj.db.api.Assertions`
805+
The `assertThat(...)` static method of `Assertions`
798806
allows to create a root assertion on https://www.javadoc.io/doc/org.assertj/assertj-db/latest/org/assertj/db/type/Changes.html[Changes].
799807

800808
[source,java]
801809
----
802-
import static org.assertj.db.api.Assertions.assertThat;
810+
// From v3.0.2
811+
import static org.assertj.core.api.Assertions.assertThat;
812+
813+
// For versions <= 3.0.1 :
814+
// import static org.assertj.db.api.Assertions.assertThat;
803815
804816
assertThat(changes)...
805817
----

src/docs/asciidoc/user-guide/assertj-db-quickstart.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,16 @@ testImplementation("org.assertj:assertj-db:{assertj-db-version}")
4040

4141
===== Other dependency management tool
4242

43-
Check this page to find the relevant https://search.maven.org/#artifactdetails|org.assertj|assertj-db|3.0.1|bundle[assertj db dependency declaration].
43+
Check this page to find the relevant https://search.maven.org/#artifactdetails|org.assertj|assertj-db|3.0.2|bundle[assertj db dependency declaration].
4444

45-
==== Statically import org.assertj.db.api.Assertions.assertThat
45+
==== Statically import Assertions.assertThat
46+
47+
[NOTE]
48+
====
49+
- From version 3.0.2 use org.assertj.**core**.api.Assertions.assertThat directly
50+
- No more double import problem - see issue https://github.com/assertj/assertj-db/issues/329[329]
51+
- For previous versions use org.assertj.**db**.api.Assertions.assertThat
52+
====
4653

4754
\... and use your preferred IDE code completion after assertThat.
4855

src/docs/asciidoc/user-guide/assertj-db-release-notes.adoc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Latest release notes:
55

6+
- link:#assertj-db-3-0-2-release-notes[AssertJ DB 3.0.2]
7+
- link:#assertj-db-3-0-1-release-notes[AssertJ DB 3.0.1]
68
- link:#assertj-db-3-0-0-release-notes[AssertJ DB 3.0.0]
79
- link:#assertj-db-2-0-2-release-notes[AssertJ DB 2.0.2]
810
- link:#assertj-db-2-0-1-release-notes[AssertJ DB 2.0.1]
@@ -14,6 +16,51 @@ Latest release notes:
1416
- link:#assertj-db-1-0-1-release-notes[AssertJ DB 1.0.1]
1517
- link:#assertj-db-1-0-0-release-notes[AssertJ DB 1.0.0]
1618

19+
[[assertj-db-3-0-2-release-notes]]
20+
==== AssertJ DB 3.0.2
21+
22+
Release date: 2026-02-21
23+
24+
[[assertj-db-3-0-2-contributors]]
25+
[.release-note-category]#icon:user[] Contributors#
26+
27+
Thanks to https://github.com/fl0rian-p[@fl0rian-p] and https://github.com/jmaniquet[Jonathan Maniquet] for their contributions.
28+
29+
[[assertj-db-3.0.2-improvements]]
30+
[.release-note-category]#icon:arrow-circle-up[] Improvements#
31+
32+
- https://github.com/assertj/assertj-db/issues/329[issue #329:] Makes Core and DB assertions coexist with only one import by https://github.com/jmaniquet[Jonathan Maniquet]
33+
34+
[[assertj-db-3.0.2-fixed]]
35+
[.release-note-category]#icon:wrench[] Fixed#
36+
37+
- https://github.com/assertj/assertj-db/issues/328[issue #328:] Use Values#areEqual when looking for modified columns by https://github.com/fl0rian-p[@fl0rian-p]
38+
39+
[[assertj-db-3.0.2-chore]]
40+
[.release-note-category]#icon:cog[] Chore#
41+
42+
- https://github.com/assertj/assertj-db/issues/332[issue #332:] Replace Junit4 assertions by AssertJ ones by https://github.com/jmaniquet[Jonathan Maniquet]
43+
44+
[[assertj-db-3-0-1-release-notes]]
45+
==== AssertJ DB 3.0.1
46+
47+
Release date: 2025-12-21
48+
49+
[[assertj-db-3-0-1-contributors]]
50+
[.release-note-category]#icon:user[] Contributors#
51+
52+
Thanks to https://github.com/fl0rian-p[@fl0rian-p] for his contribution.
53+
54+
[[assertj-db-3.0.1-fixed]]
55+
[.release-note-category]#icon:wrench[] Fixed#
56+
57+
- https://github.com/assertj/assertj-db/issues/325[issue #325] Support array comparison by https://github.com/fl0rian-p[@fl0rian-p]
58+
59+
[[assertj-db-3.0.1-chore]]
60+
[.release-note-category]#icon:cog[] Chore#
61+
62+
- Upgrade to AssertJ Parent POM 2.27.6
63+
1764
[[assertj-db-3-0-0-release-notes]]
1865
==== AssertJ DB 3.0.0
1966

src/test/java/example/db/TableAssertionExamples.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
package example.db;
22

33
// tag::user_guide[]
4-
import static org.assertj.db.api.Assertions.assertThat;
4+
// From v3.0.2
5+
import static org.assertj.core.api.Assertions.assertThat;
6+
7+
// For versions <= 3.0.1 :
8+
// import static org.assertj.db.api.Assertions.assertThat;
59

610
import org.assertj.db.type.AssertDbConnection;
711
import org.assertj.db.type.AssertDbConnectionFactory;

0 commit comments

Comments
 (0)