truth
truth copied to clipboard
Talk to Square about contributing their Kotlin-based "reflective field comparison" extension
So... yeah, we can do that. The only issue was whether y'all were ok with us adding a kotlin runtime dep - but since that will only be in the extensions sub-project, its deps shouldn't affect the main artifact (or any other sub-artifacts).
I'll roll a PR. We updated it to 1.0, as we just upgraded internally, so the current code should be appropriate.
while I'm here. QQ on artifact name and folder name.
Folder name: field
, fields
, reflective-fields
artifact: truth-field-extension
truth-fields-extension
truth-reflective-fields-extension
It uses reflection, but that's an implementation detail of HOW it tests field values. It's not the important thing from the user's perspective, so I'm not really married to including "reflective" in the artifact/folder structure, but I'm open to it. Any other naming options?
I've tentatively gone with "fields" as a folder name, and "truth-fields-extension" as an artifact name, but it's changeable. That's just the default I picked until I hear more from folks here.
That seems fine to me. (Maybe I'll see the code and suddenly realize that I was overlooking something, but all the more reason to stick with what you have now.)
Cool. Pretty close. Found some un-handled edge cases which I figured I'd fix on the way. Just fixing up the readme now.
This would be nice, especially for a project migrating from AssertJ where field by field comparisons are available 👍