Migrate to JUnit 5 asserts and assumes#286
Merged
garydgregory merged 1 commit intoapache:masterfrom Sep 13, 2024
Merged
Conversation
de86bc5 to
ac39776
Compare
ac39776 to
c8b26b7
Compare
Contributor
Author
|
I've added a quick fix in the pom as the tests were no longer running after the rename |
garydgregory
approved these changes
Sep 13, 2024
Member
garydgregory
left a comment
There was a problem hiding this comment.
See my comments, for future contributions.
| for (final PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) { | ||
| if (pd.getName().equals("file")) { | ||
| Assume.assumeTrue("BEANUTILS-492: IndexedPropertyDescriptor no longer supported for java.util.List", pd instanceof IndexedPropertyDescriptor); | ||
| assumeTrue(pd instanceof IndexedPropertyDescriptor, "BEANUTILS-492: IndexedPropertyDescriptor no longer supported for java.util.List"); |
Member
There was a problem hiding this comment.
In the future, you can use assertInstanceOf().
| // despite being loaded via a classloader different from the one | ||
| // that loaded the Converter class. | ||
| assertTrue("Converter loader via child does not implement parent type", newFloatConverter instanceof Converter); | ||
| assertTrue(newFloatConverter instanceof Converter, "Converter loader via child does not implement parent type"); |
Member
There was a problem hiding this comment.
In the future, you can use assertInstanceOf().
| assertEquals("from String to URL", urlString, converter.convert(URL.class, urlString).toString()); | ||
| assertEquals("from String to null type", urlString, converter.convert(null, urlString).toString()); | ||
| assertEquals(urlString, converter.convert(URL.class, urlString).toString(), "from String to URL"); | ||
| assertEquals(urlString, converter.convert(null, urlString).toString(),"from String to null type"); |
Member
There was a problem hiding this comment.
In the future, make sure you have a space after a comma. I'll just reformat post merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgraded JUnit 4 asserts and assumes to JUnit 5.