Fixed references to wrong AssertJ version 13.2.0 instead of 3.12.0, courtesy of Bernhard R.

This commit is contained in:
Chris Hodges 2019-08-04 18:29:59 +02:00
parent df11939589
commit a4535afbbb
3 changed files with 4 additions and 4 deletions

View File

@ -265,7 +265,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the
to: assertThat(array).hasSameSizeAs(anotherArray); to: assertThat(array).hasSameSizeAs(anotherArray);
``` ```
and additionally with AssertJ 13.2.0 or later and additionally with AssertJ 3.12.0 or later
``` ```
from: assertThat(array.length).isLessThanOrEqualTo(expression); from: assertThat(array.length).isLessThanOrEqualTo(expression);
@ -607,7 +607,7 @@ Feel free to use the code (in package ```de.platon42.intellij.jupiter```) for yo
#### V0.3 (07-Apr-19) #### V0.3 (07-Apr-19)
- New inspection AssertThatBinaryExpressionIsTrueOrFalse that will find and fix common binary expressions and ```equals()``` statements (more than 150 combinations) inside ```assertThat()```. - New inspection AssertThatBinaryExpressionIsTrueOrFalse that will find and fix common binary expressions and ```equals()``` statements (more than 150 combinations) inside ```assertThat()```.
- Merged AssertThatObjectIsNull and AssertThatObjectIsNotNull to AssertThatObjectIsNullOrNotNull. - Merged AssertThatObjectIsNull and AssertThatObjectIsNotNull to AssertThatObjectIsNullOrNotNull.
- Support for ```hasSizeLessThan()```, ```hasSizeLessThanOrEqualTo()```, ```hasSizeGreaterThanOrEqualTo()```, and ```hasSizeGreaterThan()``` for AssertThatSizeInspection (with AssertJ >=13.2.0). - Support for ```hasSizeLessThan()```, ```hasSizeLessThanOrEqualTo()```, ```hasSizeGreaterThanOrEqualTo()```, and ```hasSizeGreaterThan()``` for AssertThatSizeInspection (with AssertJ >=3.12.0).
- Really fixed highlighting for JUnit conversion. Sorry. - Really fixed highlighting for JUnit conversion. Sorry.
#### V0.2 (01-Apr-19) #### V0.2 (01-Apr-19)

View File

@ -59,7 +59,7 @@ class AssertThatSizeInspection : AbstractAssertJInspection() {
val replacementMethod = isTestForEmpty.map(MethodNames.IS_EMPTY, MethodNames.IS_NOT_EMPTY) val replacementMethod = isTestForEmpty.map(MethodNames.IS_EMPTY, MethodNames.IS_NOT_EMPTY)
return Match(expression, replacementMethod, noExpectedExpression = true) return Match(expression, replacementMethod, noExpectedExpression = true)
} else if (hasAssertJMethod(expression, ABSTRACT_ITERABLE_ASSERT_CLASSNAME, MethodNames.HAS_SIZE_LESS_THAN)) { } else if (hasAssertJMethod(expression, ABSTRACT_ITERABLE_ASSERT_CLASSNAME, MethodNames.HAS_SIZE_LESS_THAN)) {
// new stuff in AssertJ 13.2.0 // new stuff in AssertJ 3.12.0
val replacementMethod = BONUS_EXPRESSIONS_CALL_MATCHER_MAP.find { it.first.test(expression) }?.second ?: return null val replacementMethod = BONUS_EXPRESSIONS_CALL_MATCHER_MAP.find { it.first.test(expression) }?.second ?: return null
return Match(expression, replacementMethod) return Match(expression, replacementMethod)
} }

View File

@ -2,6 +2,6 @@
<body> <body>
Makes assertions on sizes of arrays, collections, strings, or CharSequences more concise by replacing them with isEmpty(), isNotEmpty(), hasSize(), or hasSameSizeAs(). Makes assertions on sizes of arrays, collections, strings, or CharSequences more concise by replacing them with isEmpty(), isNotEmpty(), hasSize(), or hasSameSizeAs().
<!-- tooltip end --> <!-- tooltip end -->
<br>Several more conversions are available with AssertJ 13.2.0 or later. <br>Several more conversions are available with AssertJ 3.12.0 or later.
</body> </body>
</html> </html>