diff --git a/README.md b/README.md index 520009f..67c30b9 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ You can toggle the various inspections in the Settings/Editor/Inspections in the 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); @@ -607,7 +607,7 @@ Feel free to use the code (in package ```de.platon42.intellij.jupiter```) for yo #### 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()```. - 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. #### V0.2 (01-Apr-19) diff --git a/src/main/java/de/platon42/intellij/plugins/cajon/inspections/AssertThatSizeInspection.kt b/src/main/java/de/platon42/intellij/plugins/cajon/inspections/AssertThatSizeInspection.kt index 0ba11e6..7f596c5 100644 --- a/src/main/java/de/platon42/intellij/plugins/cajon/inspections/AssertThatSizeInspection.kt +++ b/src/main/java/de/platon42/intellij/plugins/cajon/inspections/AssertThatSizeInspection.kt @@ -59,7 +59,7 @@ class AssertThatSizeInspection : AbstractAssertJInspection() { val replacementMethod = isTestForEmpty.map(MethodNames.IS_EMPTY, MethodNames.IS_NOT_EMPTY) return Match(expression, replacementMethod, noExpectedExpression = true) } 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 return Match(expression, replacementMethod) } diff --git a/src/main/resources/inspectionDescriptions/AssertThatSize.html b/src/main/resources/inspectionDescriptions/AssertThatSize.html index 2c0b2d2..0cf0d0f 100644 --- a/src/main/resources/inspectionDescriptions/AssertThatSize.html +++ b/src/main/resources/inspectionDescriptions/AssertThatSize.html @@ -2,6 +2,6 @@
Makes assertions on sizes of arrays, collections, strings, or CharSequences more concise by replacing them with isEmpty(), isNotEmpty(), hasSize(), or hasSameSizeAs(). -