Skip to content

Commit f0cde83

Browse files
Madjoszscordio
andauthored
Pin Javadoc URLs to current stable version (#183)
Co-authored-by: Stefano Cordio <stefano.cordio@gmail.com>
1 parent 9bbebec commit f0cde83

19 files changed

Lines changed: 214 additions & 213 deletions

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version = 1.0
66
# Note that if --release is added then -target and -source are ignored.
77
javacRelease = 8
88

9-
assertjVersion = 3.27.6
9+
assertjVersion = 3.27.7
1010
assertjJodaTimeVersion = 2.2.0
1111
assertjDbVersion = 3.0.1
1212
ota4jVersion = 1.2.0
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
:assertj-core-javadoc-root: https://www.javadoc.io/doc/org.assertj/assertj-core/latest/
2-
:assertj-guava-javadoc-root: https://www.javadoc.io/doc/org.assertj/assertj-guava/latest/
3-
:assertj-joda-time-javadoc-root: https://www.javadoc.io/doc/org.assertj/assertj-joda-time/latest/
1+
:assertj-core-javadoc: https://www.javadoc.io/doc/org.assertj/assertj-core/{assertj-version}
2+
:assertj-guava-javadoc: https://www.javadoc.io/doc/org.assertj/assertj-guava/{assertj-version}
3+
:assertj-joda-time-javadoc: https://www.javadoc.io/doc/org.assertj/assertj-joda-time/{assertj-joda-time-version}
44
//
5-
:assertj-core-repo: https://github.com/assertj/assertj
6-
:assertj-examples-repo: https://github.com/assertj/assertj-examples
7-
:assertj-examples-base-package: https://github.com/assertj/assertj-examples/blob/main/assertions-examples/src/test/java/org/assertj/examples/
8-
:assertj-guava-repo: https://github.com/assertj/assertj
9-
:assertj-swing-repo: https://github.com/assertj/assertj-swing
10-
:release-branch: main
11-
:current-branch: {assertj-core-repo}/tree/{release-branch}
5+
:assertj-core-github: https://github.com/assertj/assertj
6+
:assertj-doc-github: https://github.com/assertj/doc
7+
:assertj-examples-github: https://github.com/assertj/assertj-examples
8+
:assertj-examples-base-package: https://github.com/assertj/assertj-examples/blob/main/assertions-examples/src/test/java/org/assertj/examples
9+
:assertj-guava-github: https://github.com/assertj/assertj
10+
:assertj-swing-github: https://github.com/assertj/assertj-swing
11+
:release-branch: main
12+
:current-branch: {assertj-core-github}/tree/{release-branch}
1213
//
13-
:AssertJ: https://assertj.github.io/doc/[AssertJ]
14-
:StackOverflow: https://stackoverflow.com/questions/tagged/assertj[Stack Overflow]
14+
:AssertJ: https://assertj.github.io/doc/[AssertJ]
15+
:StackOverflow: https://stackoverflow.com/questions/tagged/assertj[Stack Overflow]

src/docs/asciidoc/user-guide/assertj-core-assertions-guide.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
This section describes the assertions provided by AssertJ Core and other useful features to get the best of it.
55

6-
AssertJ Core http://www.javadoc.io/doc/org.assertj/assertj-core/[Javadoc] explains each assertion, most of them with code examples so be sure to check it if you want to know what a specific assertion does.
6+
AssertJ Core {assertj-core-javadoc}[Javadoc] explains each assertion, most of them with code examples so be sure to check it if you want to know what a specific assertion does.
77

88
[[assertj-core-simple-example]]
99
==== A simple example
@@ -758,19 +758,19 @@ expected: JEDI [name=Luke, age=23]
758758
[[assertj-core-common-assertions]]
759759
==== Common assertions
760760

761-
This section describes the assertions common to all types, the Javadoc for common assertions methods is available https://www.javadoc.io/static/org.assertj/assertj-core/{assertj-version}/org/assertj/core/api/AbstractAssert.html#method.summary[here].
761+
This section describes the assertions common to all types, the Javadoc for common assertions methods is available {assertj-core-javadoc}/org/assertj/core/api/AbstractAssert.html#method.summary[here].
762762

763763
[[assertj-core-object-assertions]]
764764
==== Object assertions
765765

766-
The Javadoc for `Object` assertions is available https://www.javadoc.io/static/org.assertj/assertj-core/{assertj-version}/org/assertj/core/api/AbstractObjectAssert.html#method.summary[here].
766+
The Javadoc for `Object` assertions is available {assertj-core-javadoc}/org/assertj/core/api/AbstractObjectAssert.html#method.summary[here].
767767

768768
[[assertj-string-object-assertions]]
769769
==== String/CharSequence assertions
770770

771771
This section describes all the available assertions for `CharSequence` (including `String`, `StringBuilder`, `StringBuffer`, ...):
772772

773-
The Javadoc for `CharSequence` assertions is available https://www.javadoc.io/static/org.assertj/assertj-core/{assertj-version}/org/assertj/core/api/AbstractCharSequenceAssert.html#method.summary[here].
773+
The Javadoc for `CharSequence` assertions is available {assertj-core-javadoc}/org/assertj/core/api/AbstractCharSequenceAssert.html#method.summary[here].
774774

775775

776776
[[assertj-core-group-assertions]]
@@ -781,8 +781,8 @@ The Javadoc for `CharSequence` assertions is available https://www.javadoc.io/st
781781

782782
All the available assertions are described in:
783783

784-
* iterables: {assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#method.summary
785-
* arrays: {assertj-core-javadoc-root}org/assertj/core/api/AbstractObjectArrayAssert.html#method.summary
784+
* iterables: {assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#method.summary
785+
* arrays: {assertj-core-javadoc}/org/assertj/core/api/AbstractObjectArrayAssert.html#method.summary
786786

787787
The next sections focus on some features worth knowing to get the best of AssertJ, notably:
788788

@@ -802,28 +802,28 @@ There are different flavors of `contains` assertion, here's a table to help choo
802802
|===
803803
|Assertion |Description
804804

805-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#contains(ELEMENT&#46;&#46;&#46;)[`contains`]
805+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#contains(ELEMENT&#46;&#46;&#46;)[`contains`]
806806
|Verifies that the actual iterable/array contains the given values in any order
807807

808-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsOnly(ELEMENT&#46;&#46;&#46;)[`containsOnly`]
808+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsOnly(ELEMENT&#46;&#46;&#46;)[`containsOnly`]
809809
|Verifies that the actual group contains only the given values and nothing else in any order and ignoring duplicates (i.e. once a value is found, its duplicates are also considered found)
810810

811-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsExactly(ELEMENT&#46;&#46;&#46;)[`containsExactly`]
811+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsExactly(ELEMENT&#46;&#46;&#46;)[`containsExactly`]
812812
|Verifies that the actual iterable/array contains exactly the given values and nothing else **in order**
813813

814-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsExactlyInAnyOrder(ELEMENT&#46;&#46;&#46;)[`containsExactlyInAnyOrder`]
814+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsExactlyInAnyOrder(ELEMENT&#46;&#46;&#46;)[`containsExactlyInAnyOrder`]
815815
|Verifies that the actual iterable/array contains exactly the given values and nothing else **in any order**
816816

817-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsSequence(ELEMENT&#46;&#46;&#46;)[`containsSequence`]
817+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsSequence(ELEMENT&#46;&#46;&#46;)[`containsSequence`]
818818
|Verifies that the actual group contains the given sequence in the correct order and **without extra values between the sequence values**
819819

820-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsSubsequence(ELEMENT&#46;&#46;&#46;)[`containsSubsequence`]
820+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsSubsequence(ELEMENT&#46;&#46;&#46;)[`containsSubsequence`]
821821
|Verifies that the actual group contains the given subsequence in the correct order **possibly with other values between them**
822822

823-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsOnlyOnce(ELEMENT&#46;&#46;&#46;)[`containsOnlyOnce`]
823+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsOnlyOnce(ELEMENT&#46;&#46;&#46;)[`containsOnlyOnce`]
824824
|Verifies that the actual iterable/array contains the given values only once
825825

826-
|{assertj-core-javadoc-root}org/assertj/core/api/AbstractIterableAssert.html#containsAnyOf(ELEMENT&#46;&#46;&#46;)[`containsAnyOf`]
826+
|{assertj-core-javadoc}/org/assertj/core/api/AbstractIterableAssert.html#containsAnyOf(ELEMENT&#46;&#46;&#46;)[`containsAnyOf`]
827827
|Verifies that the actual iterable/array contains at least one of the given values (like an `or` operator on the given values)
828828

829829
|===
@@ -954,7 +954,7 @@ Filtering is handy to target assertions on some specific elements, the filter cr
954954
* an element link:#filtering-elements-matching-given-assertions[matching some assertions]
955955
* an element matching a link:#filtering-with-a-condition[Condition]
956956

957-
Let's explore these options in some examples taken from {assertj-examples-repo}/tree/main/assertions-examples/src/test/java/org/assertj/examples/FilterExamples.java#L47[FilterExamples] from the {assertj-examples-repo}[assertions-examples] project.
957+
Let's explore these options in some examples taken from {assertj-examples-github}/tree/main/assertions-examples/src/test/java/org/assertj/examples/FilterExamples.java#L47[FilterExamples] from the {assertj-examples-github}[assertions-examples] project.
958958

959959
====== Filtering with a Predicate
960960

@@ -1148,7 +1148,7 @@ assertThat(fellowshipOfTheRing).extracting("name", String.class)
11481148

11491149
====== Extracting multiple values
11501150

1151-
You can extract several values from the elements under test and check them using {assertj-core-javadoc-root}org/assertj/core/api/Assertions.html#tuple(java.lang.Object&#46;&#46;&#46;)[tuples].
1151+
You can extract several values from the elements under test and check them using {assertj-core-javadoc}/org/assertj/core/api/Assertions.html#tuple(java.lang.Object&#46;&#46;&#46;)[tuples].
11521152

11531153
As an example, let's check the name, age and race's name of each TolkienCharacter element:
11541154

@@ -1174,7 +1174,7 @@ assertThat(fellowshipOfTheRing).extracting(TolkienCharacter::getName,
11741174

11751175
The extracted name, age and race's name values of the current element are grouped in a tuple, thus you need to use tuples for specifying the expected values.
11761176

1177-
More examples are available in link:{assertj-examples-base-package}IterableAssertionsExamples.java#L210[IterableAssertionsExamples.java] of the link:{assertj-examples-repo}[assertj-examples] project.
1177+
More examples are available in link:{assertj-examples-base-package}/IterableAssertionsExamples.java#L210[IterableAssertionsExamples.java] of the link:{assertj-examples-github}[assertj-examples] project.
11781178

11791179
[[group-flat-extracting]]
11801180
====== Extracting and flattening multiple values per element
@@ -1248,7 +1248,7 @@ This chapter answers the question: how to assert that an exception has been thro
12481248
[[assertj-core-exception-assertions-reference]]
12491249
===== Reference
12501250

1251-
All the available assertions are described in the link:{assertj-core-javadoc-root}org/assertj/core/api/AbstractThrowableAssert.html#method.summary[AbstractThrowableAssert javadoc].
1251+
All the available assertions are described in the link:{assertj-core-javadoc}/org/assertj/core/api/AbstractThrowableAssert.html#method.summary[`AbstractThrowableAssert` Javadoc].
12521252

12531253
In this chapter the term `exception` is used interchangeably with `throwable`.
12541254

@@ -1269,7 +1269,7 @@ If you use java 7, check the link:#assertj-core-exception-assertions-java-7[Java
12691269

12701270
There are various ways for checking the exception message content, you can check the exact message, what it contains, its start, its end, if it matches a regex.
12711271

1272-
Most of the assertions expecting a `String` can use the https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#format-java.lang.String-java.lang.Object...-[String.format] syntax.
1272+
Most of the assertions expecting a `String` can use the https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#format-java.lang.String-java.lang.Object\...-[String.format] syntax.
12731273

12741274
Examples:
12751275
[source,java]
@@ -2750,4 +2750,4 @@ include::{testDir}/example/core/AssumptionsDemo.java[tags=assumption_met]
27502750
[[assertj-core-javadoc]]
27512751
==== Javadoc
27522752

2753-
http://www.javadoc.io/doc/org.assertj/assertj-core/ is the latest version of AssertJ Core Javadoc, each assertion is explained, most of them with code examples so be sure to check it if you want to know what a specific assertion does.
2753+
{assertj-core-javadoc} is the latest version of AssertJ Core Javadoc, each assertion is explained, most of them with code examples so be sure to check it if you want to know what a specific assertion does.

src/docs/asciidoc/user-guide/assertj-core-extension.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AssertJ can be extends by Condition or writing your own assertions class.
66
[[assertj-core-conditions]]
77
==== Conditions
88

9-
Assertions can be extended by using conditions, to create a condition you just have to implement https://www.javadoc.io/doc/org.assertj/assertj-core/latest/org/assertj/core/api/Condition.html[`org.assertj.assertions.core.Condition`] and its unique method matches.
9+
Assertions can be extended by using conditions, to create a condition you just have to implement {assertj-core-javadoc}/org/assertj/core/api/Condition.html[`org.assertj.assertions.core.Condition`] and its unique method matches.
1010

1111
Once your Condition is created, you can use it with methods: `is(myCondition)` or `has(myCondition)`, both verifying that the condition is met (hint: pick the one that makes your code more readable).
1212

@@ -32,7 +32,7 @@ You can verify that a Condition is met on elements of a collection, with the fol
3232

3333
Moreover all Condition related methods have their negation counterpart, `is`/`isNot`, `have`/`doesNotHave`, `are`/`areNot`, ...
3434

35-
The examples below are from https://github.com/assertj/assertj-examples/[assertj-examples] and more specifically https://github.com/assertj/assertj-examples/blob/main/assertions-examples/src/test/java/org/assertj/examples/condition/UsingConditionExamples.java[UsingConditionExamples.java].
35+
The examples below are from {assertj-examples-github}[assertj-examples] and more specifically {assertj-examples-base-package}/condition/UsingConditionExamples.java[`UsingConditionExamples`].
3636

3737
[[assertj-core-condition-creation]]
3838
===== Creating a Condition
@@ -46,7 +46,7 @@ import static org.assertj.core.util.Sets.newLinkedHashSet;
4646
static Set<String> JEDIS = newLinkedHashSet("Luke", "Yoda", "Obiwan");
4747
4848
// implementation with Java 8 lambda
49-
Condition<String> jediPower = new Condition<>(JEDIS::contains, "jedi power");
49+
Condition<String> jediPower = new Condition<>(JEDIS::contains, "jedi power");
5050
5151
// implementation with Java 7
5252
Condition<String> jedi = new Condition<String>("jedi") {
@@ -115,7 +115,7 @@ Let's define a sith condition:
115115
[source,java]
116116
----
117117
List<String> SITHS = list("Sidious", "Vader", "Plagueis");
118-
Condition<String> sith = new Condition<>(SITHS::contains, "sith");
118+
Condition<String> sith = new Condition<>(SITHS::contains, "sith");
119119
----
120120

121121
We can write these assertions:
@@ -147,7 +147,7 @@ Sections:
147147

148148
Let's see how to do that with an example!
149149

150-
The example is taken from https://github.com/assertj/assertj-examples/[assertj-examples] and more specifically https://github.com/assertj/assertj-examples/blob/main/assertions-examples/src/test/java/org/assertj/examples/custom/TolkienCharacterAssert.java[TolkienCharacterAssert.java].
150+
The example is taken from {assertj-examples}/[assertj-examples] and more specifically {assertj-examples-base-package}/custom/TolkienCharacterAssert.java[TolkienCharacterAssert.java].
151151

152152
We want to have assertion for the `TolkienCharacter` domain model class shown below:
153153
[source,java]
@@ -210,7 +210,7 @@ public class TolkienCharacterAssert extends AbstractAssert<TolkienCharacterAsser
210210
To use our custom assertion class, simply call the `assertThat` factory method with the object to test:
211211
[source,java]
212212
----
213-
// use assertThat from TolkienCharacterAssert to check TolkienCharacter
213+
// use assertThat from TolkienCharacterAssert to check TolkienCharacter
214214
TolkienCharacterAssert.assertThat(frodo).hasName("Frodo");
215215
216216
// code is more elegant when TolkienCharacterAssert.assertThat is imported statically :
@@ -222,19 +222,19 @@ Well, that was not too difficult, but having to add a static import for each `as
222222
[[assertj-core-custom-assertions-entry-point]]
223223
===== Providing an entry point for all custom assertions
224224

225-
Now that you have a bunch of custom assertions classes, you want to access them easily. Just create a `CustomAssertions` class providing static `assertThat` methods for each of your assertions classes.
225+
Now that you have a bunch of custom assertions classes, you want to access them easily. Just create a `CustomAssertions` class providing static `assertThat` methods for each of your assertions classes.
226226

227227
Example:
228228
[source,java]
229229
----
230230
public class MyProjectAssertions {
231231
232-
// give access to TolkienCharacter assertion
232+
// give access to TolkienCharacter assertion
233233
public static TolkienCharacterAssert assertThat(TolkienCharacter actual) {
234234
return new TolkienCharacterAssert(actual);
235235
}
236236
237-
// give access to TolkienCharacter Race assertion
237+
// give access to TolkienCharacter Race assertion
238238
public static RaceAssert assertThat(Race actual) {
239239
return new RaceAssert(actual);
240240
}
@@ -272,7 +272,7 @@ import static my.project.MyOtherAssertions.assertThat;
272272
@Test
273273
public void ambiguous_assertThat_resolution() {
274274
// ERROR: assertThat(String) is ambiguous!
275-
// assertThat(String) is available from MyAssertions AND MyOtherAssertions
275+
// assertThat(String) is available from MyAssertions AND MyOtherAssertions
276276
// (it is defined in Assertions the class both MyAssertions and MyOtherAssertions inherits from)
277277
assertThat("frodo").contains("do");
278278
}

src/docs/asciidoc/user-guide/assertj-core-migration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If the `*Test.java` file pattern does not suit you, just specify another as an a
7878
After executing it, you will need to :
7979

8080
* Optimize imports with your IDE to remove unused imports.
81-
* If you were using `assertEquals` with a delta to compare numbers, you will need to statically import `org.assertj.core.api.Assertions.within` which is how you express deltas in AssertJ (see the {assertj-examples-repo}/blob/main/assertions-examples/src/test/java/org/assertj/examples/NumberAssertionsExamples.java[number_assertions_with_offset_examples()] test at the end of `NumberAssertionsExamples`).
81+
* If you were using `assertEquals` with a delta to compare numbers, you will need to statically import `org.assertj.core.api.Assertions.within` which is how you express deltas in AssertJ (see the {assertj-examples-github}/blob/main/assertions-examples/src/test/java/org/assertj/examples/NumberAssertionsExamples.java[number_assertions_with_offset_examples()] test at the end of `NumberAssertionsExamples`).
8282

8383
===== Script output
8484

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@ image::ide-completion.png[]
186186
[[assertj-core-javadoc-quickstart]]
187187
==== Javadoc
188188

189-
http://www.javadoc.io/doc/org.assertj/assertj-core/ is the latest version of AssertJ Core Javadoc, each assertion is explained, most of them with code examples so be sure to check it if you want to know what a specific assertion does.
189+
{assertj-core-javadoc} is the latest version of AssertJ Core Javadoc, each assertion is explained, most of them with code examples so be sure to check it if you want to know what a specific assertion does.

0 commit comments

Comments
 (0)