diff --git a/antora-playbook.yml b/antora-playbook.yml index 1222ef4..ea9cadc 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -13,7 +13,10 @@ content: sources: - url: . branches: HEAD - start_path: home + start_paths: + - home + - assertj-joda-time + - assertj-swing - url: https://github.com/marcphilipp/assertj branches: - antora-3.x diff --git a/assertj-joda-time/antora.yml b/assertj-joda-time/antora.yml new file mode 100644 index 0000000..49848e3 --- /dev/null +++ b/assertj-joda-time/antora.yml @@ -0,0 +1,11 @@ +name: assertj-joda-time +title: AssertJ Joda Time +version: ~ +nav: + - modules/ROOT/nav.adoc +asciidoc: + attributes: + assertj-joda-time-version: '2.2.0' + assertj-core-javadoc: 'https://www.javadoc.io/doc/org.assertj/assertj-core/3.27.7' + assertj-joda-time-javadoc: 'https://www.javadoc.io/doc/org.assertj/assertj-joda-time/2.2.0' + assertj-examples-base-package: 'https://github.com/assertj/assertj-examples/blob/main/assertions-examples/src/test/java/org/assertj/examples' diff --git a/assertj-joda-time/modules/ROOT/nav.adoc b/assertj-joda-time/modules/ROOT/nav.adoc new file mode 100644 index 0000000..c26df1c --- /dev/null +++ b/assertj-joda-time/modules/ROOT/nav.adoc @@ -0,0 +1,3 @@ +* xref:index.adoc[] +* xref:assertions-guide.adoc[] +* xref:release-notes.adoc[] diff --git a/assertj-joda-time/modules/ROOT/pages/assertions-guide.adoc b/assertj-joda-time/modules/ROOT/pages/assertions-guide.adoc new file mode 100644 index 0000000..8a7dbce --- /dev/null +++ b/assertj-joda-time/modules/ROOT/pages/assertions-guide.adoc @@ -0,0 +1,231 @@ += Assertions Guide + +This section describes the assertions provided by AssertJ Joda Time. + +In addition to specific type assertions, each type inherits assertions from {assertj-core-javadoc}/org/assertj/core/api/AbstractAssert.html[`org.assertj.core.api.AbstractAssert`]. + +== LocalDate + +[%autowidth] +|=== +|Assertion |Description + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#hasYear-int-[`hasYear(int expectedYear)`] +|Verifies that the year of the actual `LocalDate` is equal to the given year + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#hasMonthOfYear-int-[`hasMonthOfYear(int expectedMonthOfYear)`] +|Verifies that the month of the actual `LocalDate` is equal to the given month + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#hasDayOfMonth-int-[`hasDayOfMonth(int expectedDayOfMonth)`] +|Verifies that the day of month of the actual `LocalDate` is equal to the given day of month + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isAfter-org.joda.time.LocalDate-[`isAfter(org.joda.time.LocalDate other)`] +|Verifies that the actual `LocalDate` is strictly after the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isAfter-java.lang.String-[`isAfter(String localDateAsString)`] +|Calls `isAfter(DateTime)` with a `LocalDate` built from the given `String` which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isAfterOrEqualTo-org.joda.time.LocalDate-[`isAfterOrEqualTo(org.joda.time.LocalDate other)`] +|Verifies that the actual `LocalDate` is after or equals to the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isAfterOrEqualTo-java.lang.String-[`isAfterOrEqualTo(String localDateAsString)`] +|Calls `isAfterOrEqualTo(DateTime)` with a `LocalDate` built from the given `String` which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isBefore-org.joda.time.LocalDate-[`isBefore(org.joda.time.LocalDate other)`] +|Verifies that the actual `LocalDate` is strictly before the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isBefore-java.lang.String-[`isBefore(String localDateAsString)`] +|Calls `isBefore(DateTime)` with a `LocalDate` built from the given `String` which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isBeforeOrEqualTo-org.joda.time.LocalDate-[`isBeforeOrEqualTo(org.joda.time.LocalDate other)`] +|Verifies that the actual `LocalDate` is before or equals to the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isBeforeOrEqualTo-java.lang.String-[`isBeforeOrEqualTo(String localDateAsString)`] +|Calls `isBeforeOrEqualTo(DateTime)` with a `LocalDate` built from the given `String` which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isEqualTo-java.lang.String-[`isEqualTo(String localDateAsString)`] +|Calls `AbstractAssert.isEqualTo(Object)` passing a `LocalDate` built from the given `String` which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isIn-java.lang.String\...-[`isIn(String... dateTimesAsString)`] +|Calls `isIn(DateTime...)` with DateTimes built from given Strings which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isNotEqualTo-java.lang.String-[`isNotEqualTo(String localDateAsString)`] +|Calls `isNotEqualTo(DateTime)` with a `LocalDate` built from the given `String` which must follow ISO8601 format `yyyy-MM-dd` + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateAssert.html#isNotIn-java.lang.String\...-[`isNotIn(String... localDatesAsString)`] +|Calls `isNotIn(org.joda.DateTime...)` with DateTime built from the given strings which must follow ISO8601 format `yyyy-MM-dd` + +|=== + +== LocalDateTime + +[%autowidth] +|=== +|Assertion |Description + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasDayOfMonth-int-[`hasDayOfMonth(int expectedDayOfMonth)`] +|Verifies that the day of month of the actual `LocalDateTime` is equal to the given day of month + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasHourOfDay-int-[`hasHourOfDay(int expectedHourOfDay)`] +|Verifies that the hour of the actual `LocalDateTime` is equal to the given hour + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasMillisOfSecond-int-[`hasMillisOfSecond(int expectedMillisOfSecond)`] +|Verifies that the milliseconds of the actual `LocalDateTime` is equal to the given milliseconds + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasMinuteOfHour-int-[`hasMinuteOfHour(int expectedMinuteOfHour)`] +|Verifies that the minute of the actual `LocalDateTime` is equal to the given minute + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasMonthOfYear-int-[`hasMonthOfYear(int expectedMonthOfYear)`] +|Verifies that the month of the actual `LocalDateTime` is equal to the given month + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasSecondOfMinute-int-[`hasSecondOfMinute(int expectedSecondOfMinute)`] +|Verifies that the seconds of the actual `LocalDateTime` is equal to the given seconds + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#hasYear-int-[`hasYear(int expectedYear)`] +|Verifies that the year of the actual `LocalDateTime` is equal to the given year + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isAfter-org.joda.time.LocalDateTime-[`isAfter(org.joda.time.LocalDateTime other)`] +|Verifies that the actual `LocalDateTime` is strictly after the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isAfter-java.lang.String-[`isAfter(String localDateTimeAsString)`] +|Calls `isAfter(DateTime)` with a `LocalDateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isAfterOrEqualTo-org.joda.time.LocalDateTime-[`isAfterOrEqualTo(org.joda.time.LocalDateTime other)`] +|Verifies that the actual `LocalDateTime` is after or equals to the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isAfterOrEqualTo-java.lang.String-[`isAfterOrEqualTo(String localDateTimeAsString)`] +|Calls `isAfterOrEqualTo(DateTime)` with a `LocalDateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isBefore-org.joda.time.LocalDateTime-[`isBefore(org.joda.time.LocalDateTime other)`] +|Verifies that the actual `LocalDateTime` is strictly before the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isBefore-java.lang.String-[`isBefore(String localDateTimeAsString)`] +|Calls `isBefore(DateTime)` with a `LocalDateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isBeforeOrEqualTo-org.joda.time.LocalDateTime-[`isBeforeOrEqualTo(org.joda.time.LocalDateTime other)`] +|Verifies that the actual `LocalDateTime` is before or equals to the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isBeforeOrEqualTo-java.lang.String-[`isBeforeOrEqualTo(String localDateTimeAsString)`] +|Calls `isBeforeOrEqualTo(DateTime)` with a `LocalDateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isEqualTo-java.lang.String-[`isEqualTo(String localDateTimeAsString)`] +|Calls `AbstractAssert.isEqualTo(Object)` passing a `LocalDateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isEqualToIgnoringHours-org.joda.time.LocalDateTime-[`isEqualToIgnoringHours(org.joda.time.LocalDateTime other)`] +|Verifies that actual and given `LocalDateTime` have same year, month and day fields (hour, minute, second and millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isEqualToIgnoringMinutes-org.joda.time.LocalDateTime-[`isEqualToIgnoringMinutes(org.joda.time.LocalDateTime other)`] +|Verifies that actual and given `LocalDateTime` have same year, month, day and hour fields (minute, second and millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isEqualToIgnoringSeconds-org.joda.time.LocalDateTime-[`isEqualToIgnoringSeconds(org.joda.time.LocalDateTime other)`] +|Verifies that actual and given `LocalDateTime` have same year, month, day, hour and minute fields (second and millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isEqualToIgnoringMillis-org.joda.time.LocalDateTime-[`isEqualToIgnoringMillis(org.joda.time.LocalDateTime other)`] +|Verifies that actual and given `LocalDateTime` have same year, month, day, hour, minute and second fields, (millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isIn-java.lang.String\...-[`isIn(String... localDateTimesAsString)`] +|Calls `isIn(DateTime...)` with DateTimes built from given Strings which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format] + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isNotEqualTo-java.lang.String-[`isNotEqualTo(String localDateTimeAsString)`] +|Calls `isNotEqualTo(DateTime)` with a `LocalDateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format] + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/LocalDateTimeAssert.html#isNotIn-java.lang.String\...-[`isNotIn(String... dateTimesAsString)`] +|Calls `isNotIn(org.joda.DateTime...)` with DateTime built from the given strings which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#localDateOptionalTimeParser()[ISO DateTime format] + + +|=== + +== DateTime + +[%autowidth] +|=== +|Assertion |Description + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasDayOfMonth-int-[`hasDayOfMonth(int expectedDayOfMonth)`] +|Verifies that the day of month of the actual `DateTime` is equal to the given day of month + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasHourOfDay-int-[`hasHourOfDay(int expectedHourOfDay)`] +|Verifies that the hour of the actual `DateTime` is equal to the given hour + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasMillisOfSecond-int-[`hasMillisOfSecond(int expectedMillisOfSecond)`] +|Verifies that the milliseconds of the actual `DateTime` is equal to the given milliseconds + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasMinuteOfHour-int-[`hasMinuteOfHour(int expectedMinuteOfHour)`] +|Verifies that the minute of the actual `DateTime` is equal to the given minute + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasMonthOfYear-int-[`hasMonthOfYear(int expectedMonthOfYear)`] +|Verifies that the month of the actual `DateTime` is equal to the given month + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasSecondOfMinute-int-[`hasSecondOfMinute(int expectedSecondOfMinute)`] +|Verifies that the seconds of the actual `DateTime` is equal to the given seconds + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#hasYear-int-[`hasYear(int expectedYear)`] +|Verifies that the year of the actual `DateTime` is equal to the given year + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isAfter-org.joda.time.DateTime-[`isAfter(org.joda.time.DateTime other)`] +|Verifies that the actual `DateTime` is strictly after the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isAfter-java.lang.String-[`isAfter(String dateTimeAsString)`] +|Calls `isAfter(DateTime)` with a `DateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isAfterOrEqualTo-org.joda.time.DateTime-[`isAfterOrEqualTo(org.joda.time.DateTime other)`] +|Verifies that the actual `DateTime` is after or equals to the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isAfterOrEqualTo-java.lang.String-[`isAfterOrEqualTo(String dateTimeAsString)`] +|Calls `isAfterOrEqualTo(DateTime)` with a `DateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isBefore-org.joda.time.DateTime-[`isBefore(org.joda.time.DateTime other)`] +|Verifies that the actual `DateTime` is strictly before the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isBefore-java.lang.String-[`isBefore(String dateTimeAsString)`] +|Calls `isBefore(DateTime)` with a `DateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isBeforeOrEqualTo-org.joda.time.DateTime-[`isBeforeOrEqualTo(org.joda.time.DateTime other)`] +|Verifies that the actual `DateTime` is before or equals to the given one + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isBeforeOrEqualTo-java.lang.String-[`isBeforeOrEqualTo(String dateTimeAsString)`] +|Calls `isBeforeOrEqualTo(DateTime)` with a `DateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isEqualTo-org.joda.time.DateTime-[`isEqualTo(org.joda.time.DateTime expected)`] +|Verifies that the actual `DateTime` is equal to the given one in actual's DateTimeZone + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isEqualTo-java.lang.String-[`isEqualTo(String dateTimeAsString)`] +|Calls `isEqualTo(DateTime)` with a `DateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format]. + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isEqualToIgnoringHours-org.joda.time.DateTime-[`isEqualToIgnoringHours(org.joda.time.DateTime other)`] +|Verifies that actual and given `DateTime` have same year, month and day fields (hour, minute, second and millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isEqualToIgnoringMinutes-org.joda.time.DateTime-[`isEqualToIgnoringMinutes(org.joda.time.DateTime other)`] +|Verifies that actual and given `DateTime` have same year, month, day and hour fields (minute, second and millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isEqualToIgnoringSeconds-org.joda.time.DateTime-[`isEqualToIgnoringSeconds(org.joda.time.DateTime other)`] +|Verifies that actual and given `DateTime` have same year, month, day, hour and minute fields (second and millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isEqualToIgnoringMillis-org.joda.time.DateTime-[`isEqualToIgnoringMillis(org.joda.time.DateTime other)`] +|Verifies that actual and given `DateTime` have same year, month, day, hour, minute and second fields, (millisecond fields are ignored in comparison) + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isIn-org.joda.time.DateTime\...-[`isIn(org.joda.time.DateTime... expected)`] +|Verifies that the actual `DateTime` is equal to one of the given `DateTime` in the actual's DateTimeZone + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isIn-java.lang.String\...-[`isIn(String... dateTimesAsString)`] +|Calls `isIn(DateTime...)` with DateTimes built from given Strings which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format] + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isNotEqualTo-org.joda.time.DateTime-[`isNotEqualTo(org.joda.time.DateTime expected)`] +|Verifies that the actual value is not equal to the given one in actual's DateTimeZone + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isNotEqualTo-java.lang.String-[`isNotEqualTo(String dateTimeAsString)`] +|Calls `isNotEqualTo(DateTime)` with a `DateTime` built from the given `String` which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format] + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isNotIn-org.joda.time.DateTime\...-[`isNotIn(org.joda.time.DateTime... expected)`] +|Verifies that the actual `DateTime` is equal to one of the given `DateTime` in the actual's DateTimeZone + +|{assertj-joda-time-javadoc}/org/assertj/jodatime/api/DateTimeAssert.html#isNotIn-java.lang.String\...-[`isNotIn(String... dateTimesAsString)`] +|Calls `isNotIn(org.joda.DateTime...)` with DateTime built from the given strings which must follow https://joda-time.sourceforge.net/api-release/org/joda/time/format/ISODateTimeFormat.html#dateTimeParser()[ISO DateTime format] + +|=== + + +[[javadoc]] +== Javadoc + +https://www.javadoc.io/doc/org.assertj/assertj-joda-time/ is the latest version of the javadoc. diff --git a/assertj-joda-time/modules/ROOT/pages/index.adoc b/assertj-joda-time/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..eb437f7 --- /dev/null +++ b/assertj-joda-time/modules/ROOT/pages/index.adoc @@ -0,0 +1,102 @@ += Quick start + +This guide is for the AssertJ Joda Time module. + +[[get-assertj-joda-time]] +== Get assertj-joda-time library + +AssertJ Joda Time artifacts are in the Maven central repository. + +[[java-versions]] +=== Supported Java versions + +AssertJ Joda Time major versions depend on different Java versions: + +* AssertJ Joda Time 2.x requires Java 8 or higher +* AssertJ Joda Time 1.x requires Java 7 or higher + +=== Maven + +[source,xml,subs=attributes+] +---- + + org.assertj + assertj-joda-time + + {assertj-joda-time-version} + test + +---- + +=== Gradle + +For Gradle users (using the Maven Central Repository) + +[source,java,subs=attributes+] +---- +testImplementation("org.assertj:assertj-joda-time:{assertj-joda-time-version}") +---- + +Or version 1.1.0 for Java 7 projects + +[source,java] +---- +testImplementation("org.assertj:assertj-joda-time:1.1.0") +---- + +=== Other build tools + +Check this page to find the relevant https://search.maven.org/artifact/org.assertj/assertj-joda-time/{assertj-joda-time-version}/bundle[assertj joda-time dependency declaration]. + +== Use Assertions class entry point + +The `org.assertj.jodatime.api.Assertions` class is the only class you need to start using AssertJ Joda Time. + +[source,java] +---- +import static org.assertj.jodatime.api.Assertions.assertThat; +---- + +== Examples + +[source,java] +---- +assertThat(dateTime).isBefore(firstDateTime); +assertThat(dateTime).isAfterOrEqualTo(secondDateTime); + +// you can use Strings in comparisons to avoid a conversion (we do that for you) +assertThat(new DateTime("2000-01-01")).isEqualTo("2000-01-01"); + +// compare DateTimes ignoring seconds and milliseconds in the comparison +dateTime1 = new DateTime(2000, 1, 1, 23, 50, 0, 0, UTC); +dateTime2 = new DateTime(2000, 1, 1, 23, 50, 10, 456, UTC); +// assertion succeeds +assertThat(dateTime1).isEqualToIgnoringSeconds(dateTime2); +---- + +For `DateTime` assertions, comparison is performed in the `DateTimeZone` of `DateTime` to test, consequently the following assertion passes: + +[source,java] +---- +DateTime utcTime = new DateTime(2013, 6, 10, 0, 0, DateTimeZone.UTC); +DateTime cestTime = new DateTime(2013, 6, 10, 2, 0, DateTimeZone.forID("Europe/Berlin")); + +assertThat(utcTime).as("in UTC time").isEqualTo(cestTime); +---- + +You can compare `DateTime` to another `DateTime`, or `LocalDateTime` to `LocalDateTime`, but not `DateTime` to `LocalDateTime`, it doesn't make sense as one is timezone dependent and the other is not. + +Note that you can find more working examples in the {assertj-examples-base-package}/JodaTimeAssertionsExamples.java[JodaTimeAssertionsExamples.java] class of the assertj-examples project. + +[[ide]] +== IDE configuration + +You can configure your IDE so that when you start typing `as` and trigger code completion `assertThat` will show up in the suggested completions. + +Eclipse: + +. Go to Window > Preferences > Java > Editor > Content Assist > Favorites > New Type. +. Enter `org.assertj.jodatime.api.Assertions` and click OK. +. Check that you see `org.assertj.jodatime.api.Assertions.*` in Favorites. + +Intellij Idea: No special configuration is needed, just start typing `asser` and then invoke completion (Ctrl-Space) twice. diff --git a/assertj-joda-time/modules/ROOT/pages/release-notes.adoc b/assertj-joda-time/modules/ROOT/pages/release-notes.adoc new file mode 100644 index 0000000..5ef3237 --- /dev/null +++ b/assertj-joda-time/modules/ROOT/pages/release-notes.adoc @@ -0,0 +1,121 @@ += Release Notes + +The Javadoc for this release can be found here: https://www.javadoc.io/doc/org.assertj/assertj-joda-time/2.2.0/index.html + +[[v2-2-0-release-notes]] +== AssertJ Joda Time 2.2.0 + +Release date: 2018-06-15 + +[[v2.2.0-contributors]] +[.release-note-category]#icon:user[] Contributors# + +Thanks to Eugene Strepetov for his contribution. + +[[v2.2.0-new-features]] +[.release-note-category]#icon:plus-circle[] New features# + +Add `LocalDate` assertions providing the following ones (Eugene Strepetov): + +- `hasYear`: Verifies that the year of the actual LocalDate is equal to the given year. +- `hasMonthOfYear`: Verifies that the month of the actual LocalDate is equal to the given month +- `hasDayOfMonth`: Verifies that the day of month of the actual LocalDate is equal to the given day +- `isBefore`: Verifies that the actual LocalDate is strictly before the given one. +- `isBeforeOrEqualTo`: Verifies that the actual LocalDate is before or equals to the given one. +- `isEqualTo`: Same assertion as `AbstractAssert.isEqualTo(Object...)` but to be used with `LocalDate` String representation. +- `isAfter`: Verifies that the actual LocalDate is strictly after the given one. +- `isAfterOrEqualTo`: Verifies that the actual LocalDate is after or equals to the given one. +- `isIn`: Same assertion as `AbstractAssert.isIn(Object...)` but to be used with `LocalDate` String representation. +- `isNotIn`: Same assertion as `AbstractAssert.isNotIn(Object...)` but to be used with `LocalDate` String representation. + +The assertions taking `String` parameter(s) can be used with `LocalDate` String representation: `yyyy-MM-dd`. + +Examples: +[source,java] +---- +LocalDate localDate = new LocalDate(2000, 1, 1); + +assertThat(localDate).hasYear(2000) + .hasMonthOfYear(1) + .hasDayOfMonth(1) + .isBefore(new LocalDate(2000, 1, 2)) + .isBefore("2000-01-02") + .isBeforeOrEqualTo(new LocalDate(2000, 1, 1)) + .isBeforeOrEqualTo("2000-01-01") + .isBeforeOrEqualTo(new LocalDate(2000, 1, 2)) + .isBeforeOrEqualTo("2000-01-02") + .isEqualTo(new LocalDate(2000, 1, 1)) + .isEqualTo("2000-01-01") + .isAfterOrEqualTo(new LocalDate(2000, 1, 1)) + .isAfterOrEqualTo("2000-01-01") + .isAfterOrEqualTo(new LocalDate(1999, 12, 31)) + .isAfterOrEqualTo("1999-12-31") + .isAfter(new LocalDate(1999, 12, 31)) + .isAfter("1999-12-31") + .isNotEqualTo("2000-01-15") + .isNotEqualTo(new LocalDate(2000, 1, 15)) + .isIn(new LocalDate(1999, 12, 31), new LocalDate(2000, 1, 1)) + .isIn("1999-12-31", "2000-01-01") + .isNotIn(new LocalDate(1999, 12, 31), new LocalDate(2000, 1, 2)) + .isNotIn("1999-12-31", "2000-01-02"); +---- + + +[[v2-1-0-release-notes]] +== AssertJ Joda Time 2.1.0 + +Release date: 2018-05-27 + +[[v2.1.0-contributors]] +[.release-note-category]#icon:user[] Contributors# + +Thanks to John Killmer for his contribution. + +[[v2.1.0-new-features]] +[.release-note-category]#icon:plus-circle[] New features# + +Add `LocalDateTime` assertions providing the following ones (John Killmer): + +- `hasYear`: Verifies that the year of the actual LocalDateTime is equal to the given year. +- `hasMonthOfYear`: Verifies that the month of the actual LocalDateTime is equal to the given month +- `hasDayOfMonth`: Verifies that the day of month of the actual LocalDateTime is equal to the given day of month +- `hasHourOfDay`: Verifies that the hour of the actual DateTime is equal to the given hour +- `hasMinuteOfHour`: Verifies that the minute of the actual LocalDateTime is equal to the given minute +- `hasSecondOfMinute`: Verifies that the seconds of the actual LocalDateTime is equal to the given seconds +- `hasMillisOfSecond`: Verifies that the milliseconds of the actual LocalDateTime is equal to the given milliseconds + +Examples: +[source,java] +---- +DateTime dateTime = new DateTime(1999, 12, 31, 23, 59, 59, 999, DateTimeZone.UTC); + +assertThat(dateTime).hasYear(1999) + .hasMonthOfYear(12) + .hasDayOfMonth(31) + .hasHourOfDay(23) + .hasMinuteOfHour(59) + .hasSecondOfMinute(59) + .hasMillisOfSecond(999); +---- + +[[v2-0-0-release-notes]] +== AssertJ Joda Time 2.0.0 + +Release date: 2016-04-10 + +[[v2.0.0-contributors]] +[.release-note-category]#icon:user[] Contributors# + +Thanks to Pascal Schumacher and David Simmons for their contributions. + +[[v2-0-0-breaking-changes]] +[.release-note-category]#icon:exclamation-triangle[] Breaking changes# + +AssertJ Joda Time 2.0.0 requires Java 8 as it relies on AssertJ Core 3.x, use 1.1.0 version if you are still using Java 7. + +[[v2-0-0-improvements]] +[.release-note-category]#icon:arrow-circle-up[] Improvements# + +* DateTime assertion: better handling of null in assertions. (David Simmons) +* To be OS agnostic, replace `\n` with `%n` in error messages. (Pascal Schumacher) +* Better spacing in Javadoc code examples. (Pascal Schumacher) diff --git a/assertj-swing/antora.yml b/assertj-swing/antora.yml new file mode 100644 index 0000000..c30e411 --- /dev/null +++ b/assertj-swing/antora.yml @@ -0,0 +1,8 @@ +name: assertj-swing +title: AssertJ Swing +version: ~ +nav: + - modules/ROOT/nav.adoc +asciidoc: + attributes: + assertj-swing-github: 'https://github.com/assertj/assertj-swing' diff --git a/assertj-swing/modules/ROOT/nav.adoc b/assertj-swing/modules/ROOT/nav.adoc new file mode 100644 index 0000000..31f850e --- /dev/null +++ b/assertj-swing/modules/ROOT/nav.adoc @@ -0,0 +1 @@ +* xref:index.adoc[] diff --git a/assertj-swing/modules/ROOT/pages/index.adoc b/assertj-swing/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..24f58c2 --- /dev/null +++ b/assertj-swing/modules/ROOT/pages/index.adoc @@ -0,0 +1,30 @@ += Release Notes + +NOTE: AssertJ Swing would not exist without its contributors, you can find them all {assertj-swing-github}/graphs/contributors[directly on GitHub]. + +Older release notes can be found in the old site: https://joel-costigliola.github.io/assertj/assertj-swing-news.html, this is important to be aware of breaking changes if you are migrating from an old version. + +[[v3-17-0-release-notes]] +== AssertJ Swing 3.17.0 + +Release date: 2020-09-13 + +[[v3.17.0-contributors]] +[.release-note-category]#icon:user[] Contributors# + +Thanks to all the contributors of this release: diba1013, Stefano Cordio and Edwin Stang. + +[[v3.17.0-breaking-changes]] +[.release-note-category]#icon:exclamation-triangle[] Breaking changes# + +* Change of AssertJ Core from 3.11.1 to 3.17.0 + +[[v3.17.0-improvements]] +[.release-note-category]#icon:arrow-circle-up[] Improvements# + +* Allow exceptions to be thrown for smaller test-code footprint. + +[[v3.17.0-fixed]] +[.release-note-category]#icon:wrench[] Fixed# + +* Fix: NPE on invoking JFrames with tray within AssertJSwingJUnitTestCase. (Edwin Stang)