Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricemery/assertions2assertj
Intellij Plugin to convert Junit and Hamcrest Assertions to AssertJ
https://github.com/ricemery/assertions2assertj
assertj intellij-plugin
Last synced: 2 months ago
JSON representation
Intellij Plugin to convert Junit and Hamcrest Assertions to AssertJ
- Host: GitHub
- URL: https://github.com/ricemery/assertions2assertj
- Owner: ricemery
- License: other
- Created: 2017-12-21T23:37:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-12T20:02:31.000Z (9 months ago)
- Last Synced: 2024-05-13T17:51:12.281Z (9 months ago)
- Topics: assertj, intellij-plugin
- Language: Kotlin
- Size: 95.7 KB
- Stars: 17
- Watchers: 3
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# Assertions2AssertJ
Helper plugin to convert Junit and Hamcrest Assertions to AssertJ.
The conversion can be run on a single file, a module or
an entire project.The plugin will aid in the conversion of assert statements, but does not support conversion
of all Hamcrest and Junit asserts scenarios. Some manual intervention may be needed.Note that AssertJ must be included in the IntelliJ project classpath for
the Plugin to successfully complete.### Usage
Select an item from within the Refactor -\> Convert Assertions to AssertJ menu.
Note that the "Convert current file" and "Convert Module" items will
only be enabled if a file is selected within the editor.### Limitations
* The plugin does NOT convert Hamcrest assertions included in Mockito
verify statements.
* The plugin does NOT convert all assertions that utilize matchers embedded
within other matchers (e.g. anyOf(equalTo(1.0), equalTo(2.0))).
* When a file contains both assertions that are converted, and assertions that
are ignored, the Hamcrest imports will still be deleted.
* Does not support the following Hamcrest matchers
* allOf
* anything
* everyItem
* hasXPath
* samePropertyValueAs
* Does not support the following Junit Asserts
* assertTimeout
* assertTimeoutPreemptively