assertj icon indicating copy to clipboard operation
assertj copied to clipboard

Add `asBoolean|Byte|Short|Int|Long|Float|Double` to `String` assertions

Open hezean opened this issue 3 years ago • 2 comments

As #2509 (comment) mentioned, several methods are added as the shortcuts for extracting boolean and numbers.

Check List:

  • Closes #2520
  • Unit tests : YES
  • Javadoc with a code example (on API only) : YES
  • PR meets the contributing guidelines

hezean avatar Apr 19 '22 10:04 hezean

Hi @scordio, sorry for bothering. This PR implements the methods you mentioned, could you please review the code?

hezean avatar Apr 20 '22 13:04 hezean

Hi @HeZean, thanks for the PR.

Despite my proposal at https://github.com/assertj/assertj-core/issues/2509#issuecomment-1057395093, we haven't discussed these new methods in the team yet, so it may take some time before we move on to the review phase.

Thanks in advance for your patience!

scordio avatar Apr 21 '22 15:04 scordio

Hi @scordio, it seems that 3.24.2 is already released. Any update on the methods related in this pr?

Tentatively slated for 3.24.0 solely for the purpose of team discussion in https://github.com/assertj/assertj/issues/2520#issuecomment-1105367372

hezean avatar Jan 18 '23 16:01 hezean

Hi @hezean , thanks again for your patience. I'll make sure this gets covered for 3.25.0.

scordio avatar Jan 20 '23 11:01 scordio

Hi @joel-costigliola, I really appreciate for your review, and thanks for giving me an opportunity to contribute to assertj!

I've just cleaned up this PR, fixing all the issues you pointed out. Please let me know if anything should be made better.

hezean avatar Mar 07 '23 18:03 hezean

Integrated thanks @hezean! I did some minor cleanup and added support for soft assertions which is a bit tricky to do if you are not familiar with how they work, you can look at the commit if you are interested, anyway you get full credit for the changes :wink:

joel-costigliola avatar Mar 09 '23 09:03 joel-costigliola