Minor documentation fixes. Prepared release.
This commit is contained in:
parent
6dab8ad552
commit
2f0d855d1e
23
README.md
23
README.md
@ -221,7 +221,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
|
|
||||||
- AssertThatObjectExpression
|
- AssertThatObjectExpression
|
||||||
|
|
||||||
Handles equals(), toString() and hashCode() inside an expected expression.
|
Handles ```equals()```, ```toString()``` and ```hashCode()``` inside an expected expression.
|
||||||
|
|
||||||
```
|
```
|
||||||
from: assertThat(objActual.equals(objExpected)).isTrue();
|
from: assertThat(objActual.equals(objExpected)).isTrue();
|
||||||
@ -236,7 +236,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
|
|
||||||
- AssertThatCollectionOrMapExpression
|
- AssertThatCollectionOrMapExpression
|
||||||
|
|
||||||
Moves collection and map operations inside ```assertThat()``` out.
|
Moves ```Collection``` and ```Map``` operations inside ```assertThat()``` out.
|
||||||
|
|
||||||
```
|
```
|
||||||
from: assertThat(collection.isEmpty()).isTrue();
|
from: assertThat(collection.isEmpty()).isTrue();
|
||||||
@ -259,7 +259,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
```
|
```
|
||||||
Analogously with ```isFalse()``` (except for ```containsAll()```).
|
Analogously with ```isFalse()``` (except for ```containsAll()```).
|
||||||
|
|
||||||
Additional transformations for maps:
|
Additional transformations for ```Map``` instances:
|
||||||
|
|
||||||
```
|
```
|
||||||
from: assertThat(map.get(key)).isEqualTo(value);
|
from: assertThat(map.get(key)).isEqualTo(value);
|
||||||
@ -287,7 +287,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
|
|
||||||
- AssertThatFileExpression
|
- AssertThatFileExpression
|
||||||
|
|
||||||
Moves File method calls inside ```assertThat()``` out.
|
Moves ```File``` method calls inside ```assertThat()``` out.
|
||||||
|
|
||||||
```
|
```
|
||||||
from: assertThat(file.canRead()).isTrue();
|
from: assertThat(file.canRead()).isTrue();
|
||||||
@ -344,8 +344,8 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
|
|
||||||
- AssertThatSize
|
- AssertThatSize
|
||||||
|
|
||||||
Makes assertions on sizes of arrays, collections, maps, strings,
|
Makes assertions on sizes on ```Array```, ```Collection```,
|
||||||
or ```CharSequence```s more concise.
|
```Map```, ```String```, or ```CharSequence``` instances more concise.
|
||||||
|
|
||||||
```
|
```
|
||||||
from: assertThat(array.length).isEqualTo(0);
|
from: assertThat(array.length).isEqualTo(0);
|
||||||
@ -381,7 +381,8 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
from: assertThat(array.length).isGreaterThanOrEqualTo(expression);
|
from: assertThat(array.length).isGreaterThanOrEqualTo(expression);
|
||||||
to: assertThat(array).hasSizeGreaterThanOrEqualTo(expression);
|
to: assertThat(array).hasSizeGreaterThanOrEqualTo(expression);
|
||||||
```
|
```
|
||||||
and analogously for collections, maps, strings and CharSequences, e.g:
|
and analogously for ```Collection```, ```Map```, ```String``` and
|
||||||
|
```CharSequence``` objects, e.g:
|
||||||
|
|
||||||
```
|
```
|
||||||
from: assertThat("string".length()).isLessThan(1);
|
from: assertThat("string".length()).isLessThan(1);
|
||||||
@ -508,7 +509,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
to: assertThat(opt).isPresent();
|
to: assertThat(opt).isPresent();
|
||||||
```
|
```
|
||||||
|
|
||||||
AssertJ for Guava needs to be available in the classpath.
|
AssertJ for Guava needs to be available in the classpath for this inspection to work.
|
||||||
|
|
||||||
- AssumeThatInsteadOfReturn
|
- AssumeThatInsteadOfReturn
|
||||||
|
|
||||||
@ -601,6 +602,8 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
|
|
||||||
### Implemented referencing
|
### Implemented referencing
|
||||||
|
|
||||||
|
You can ctrl-click on references inside .extracting() method parameters to go the
|
||||||
|
referencing method definition.
|
||||||
```
|
```
|
||||||
.extracting("field")
|
.extracting("field")
|
||||||
.extracting("outerField.fieldInsideObjectTypeOfOuterField.andSoOn")
|
.extracting("outerField.fieldInsideObjectTypeOfOuterField.andSoOn")
|
||||||
@ -614,7 +617,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
|
|||||||
.flatExtracting(Extractors.byName("fieldOrPropertyOrBareMethod.orAPathLikeAbove")
|
.flatExtracting(Extractors.byName("fieldOrPropertyOrBareMethod.orAPathLikeAbove")
|
||||||
.flatExtracting(Extractors.resultOf("bareMethod")
|
.flatExtracting(Extractors.resultOf("bareMethod")
|
||||||
```
|
```
|
||||||
Works on both POJOs and ```Iterable```s/```Array```s.
|
This works on both POJOs and ```Iterable```s/```Array```s.
|
||||||
Implementation is very basic though and does not work with fancy cascaded ```.extracting()``` sequences.
|
Implementation is very basic though and does not work with fancy cascaded ```.extracting()``` sequences.
|
||||||
If there's demand, I could add it.
|
If there's demand, I could add it.
|
||||||
|
|
||||||
@ -639,7 +642,7 @@ Feel free to use the code (in package ```de.platon42.intellij.jupiter```) for yo
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
#### V1.6 (unreleased)
|
#### V1.6 (30-Sep-19)
|
||||||
- Really fixed AssertThatGuavaOptional inspections to avoid conversions from ```.get()``` to ```.contains()```
|
- Really fixed AssertThatGuavaOptional inspections to avoid conversions from ```.get()``` to ```.contains()```
|
||||||
for array types. Sigh. Shouldn't be working >12h a day and then do some more stuff at home.
|
for array types. Sigh. Shouldn't be working >12h a day and then do some more stuff at home.
|
||||||
- Fixed a bug in AssertThatBinaryExpression inspection for ```assertThat(null != expression)``` and related
|
- Fixed a bug in AssertThatBinaryExpression inspection for ```assertThat(null != expression)``` and related
|
||||||
|
@ -43,7 +43,7 @@ intellij {
|
|||||||
|
|
||||||
patchPluginXml {
|
patchPluginXml {
|
||||||
changeNotes """
|
changeNotes """
|
||||||
<h4>V1.6 (unreleased)</h4>
|
<h4>V1.6 (30-Sep-19)</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Really fixed AssertThatGuavaOptional inspections to avoid conversions from .get() to .contains()
|
<li>Really fixed AssertThatGuavaOptional inspections to avoid conversions from .get() to .contains()
|
||||||
for array types. Sigh. Shouldn't be working >12h a day and then do some more stuff at home.
|
for array types. Sigh. Shouldn't be working >12h a day and then do some more stuff at home.
|
||||||
|
Loading…
Reference in New Issue
Block a user