Skip to content

Commit 6192628

Browse files
Publish core javadoc
1 parent 0ae954e commit 6192628

File tree

1,339 files changed

+496189
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,339 files changed

+496189
-20
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ out
2828
.metadata
2929
*.svg.cache
3030
*.pdf
31-
*.html

build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ asciidoctor {
4848
include '**/images/**'
4949
include '**/highlight/**'
5050
include '**/*.css'
51+
include '**/javadoc/**'
5152
}
5253
}
5354

@@ -60,9 +61,9 @@ asciidoctor {
6061
'releaseBranch' : version,
6162
'testDir': '../../../test/java',
6263
'outdir': outputDir.absolutePath,
63-
'source-highlighter': 'highlightjs',
64-
'highlightjsdir': 'highlight',
65-
'highlightjs-theme': 'railscasts',
64+
'source-highlighter': 'highlightjs',
65+
'highlightjsdir': 'highlight',
66+
'highlightjs-theme': 'railscasts',
6667
'tabsize': '3',
6768
'toc': 'left',
6869
'icons': 'font',
@@ -76,7 +77,7 @@ asciidoctor {
7677

7778
githubPages {
7879
repoUri = 'https://github.com/assertj/doc.git'
79-
credentials {
80+
credentials {
8081
username = project.hasProperty('githubToken') ? project.githubToken : ''
8182
password = ''
8283
}
@@ -96,4 +97,4 @@ test {
9697
reports {
9798
html.enabled = true
9899
}
99-
}
100+
}

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

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ java.lang.AssertionError: should be TolkienCharacter [name=Frodo, age=33, race=H
156156
[[assertj-core-incorrect-usage]]
157157
=== Avoiding incorrect usage
158158

159-
There are a few things to keep in mind when using AssertJ to avoid misusing it.
159+
There are a few things to keep in mind when using AssertJ to avoid misusing it.
160160

161161
==== Forgetting to call an assertion
162162

@@ -284,13 +284,13 @@ An example of a custom `Representation`:
284284
[source,java,indent=0]
285285
----
286286
// dummy class
287-
private class Example {}
287+
private class Example {}
288288
289289
public class CustomRepresentation extends StandardRepresentation { // <1>
290290
291291
// override fallbackToStringOf to handle Example formatting
292292
@Override
293-
public String fallbackToStringOf(Object o) { // <2>
293+
public String fallbackToStringOf(Object o) { // <2>
294294
if (o instanceof Example) return "Example";
295295
// fallback to default formatting.
296296
return super.fallbackToStringOf(o);
@@ -372,7 +372,7 @@ assertThat(new Example()).withRepresentation(customRepresentation)
372372
.isNull();
373373
374374
assertThat("foo").withRepresentation(customRepresentation)
375-
.startsWith("bar");
375+
.startsWith("bar");
376376
----
377377

378378

@@ -450,14 +450,14 @@ Here's a simple example to give an idea of what it can do:
450450
assertThat(sherlock).isEqualTo(sherlock2);
451451
----
452452

453-
The comparison is *not symmetrical* since it is *limited to actual's fields*, the algorithm gather actual's fields and then compare them to the corresponding expected's fields. It is then possible for the expected object to have more fields than actual which cna be handy when comparing a base type to a subtype with additional fields.
453+
The comparison is *not symmetrical* since it is *limited to actual's fields*, the algorithm gather actual's fields and then compare them to the corresponding expected's fields. It is then possible for the expected object to have more fields than actual which cna be handy when comparing a base type to a subtype with additional fields.
454454

455455
[[assertj-core-recursive-comparison-strict]]
456456
==== Strict or lenient comparison
457457

458458
By default the objects to compare can be of different types but must have the same properties/fields. For example if object under test has a `work` field of type `Address`, the expected object to compare the object under test to must also have one but it can of a different type like `AddressDto`.
459459

460-
It is possible to enforce strict type checking by calling `withStrictTypeChecking()` and make the comparison fail whenever the compared objects or their fields are not compatible. Compatible means that the expected object/field types are the same or a subtype of actual/field types, for example if actual is an `Animal` and expected a `Dog`, they will be compared fiels by field in strict type checking mode.
460+
It is possible to enforce strict type checking by calling `withStrictTypeChecking()` and make the comparison fail whenever the compared objects or their fields are not compatible. Compatible means that the expected object/field types are the same or a subtype of actual/field types, for example if actual is an `Animal` and expected a `Dog`, they will be compared fiels by field in strict type checking mode.
461461

462462
[source,java,indent=0]
463463
----
@@ -564,7 +564,7 @@ assertThat(sherlock).usingRecursiveComparison()
564564
[[assertj-core-recursive-comparison-ignoring-equals]]
565565
==== Ignoring overridden equals
566566

567-
By default the recursive comparison uses overridden `equals` methods to compare fields, it is possible to change that behavior and force a recursive comparison by calling:
567+
By default the recursive comparison uses overridden `equals` methods to compare fields, it is possible to change that behavior and force a recursive comparison by calling:
568568

569569
* `ignoringOverriddenEqualsForTypes(Class...)` Any fields of these classes are compared recursively
570570
* `ignoringOverriddenEqualsForFields(String...)` Any given fields are compared recursively
@@ -661,42 +661,48 @@ assertThat(frodo).usingRecursiveComparison()
661661
662662
assertThat(frodo).usingRecursiveComparison()
663663
.withComparatorForType(closeEnough, Double.class)
664-
.isEqualTo(reallyTallFrodo);
664+
.isEqualTo(reallyTallFrodo);
665665
----
666666

667667

668668

669669
[[assertj-core-soft-assertions]]
670670
=== Soft Assertions
671671

672-
TODO
672+
TODO
673673

674674
[[assertj-core-assumptions]]
675675
=== Assumptions
676676

677677
All AssertJ assumptions are static methods in the `Assumptions` class.
678678

679-
TODO
679+
TODO
680680
// [source,java,indent=0]
681681
// ----
682682
// include::{testDir}/example/AssumptionsDemo.java[tags=user_guide]
683683
// ----
684684

685+
[[assertj-core-javadoc]]
686+
=== Javadoc
687+
688+
The latest version of assertj core javadoc is here:
689+
690+
https://assertj.github.io/doc/javadoc/core/index.html
691+
685692
[[assertj-core-extensions]]
686693
== Extending assertions
687694

688-
TODO
695+
TODO
689696

690697
[[assertj-core-conditions]]
691698
=== Conditions
692699

693-
TODO
700+
TODO
694701

695702
[[assertj-core-custom-assertions]]
696703
=== Custom Assertions
697704

698-
TODO
699-
705+
TODO
700706

701707
[[assertj-samples]]
702708
== AssertJ Sample Projects

0 commit comments

Comments
 (0)