truth icon indicating copy to clipboard operation
truth copied to clipboard

Talk to Square about contributing their Kotlin-based "reflective field comparison" extension

Open cpovirk opened this issue 5 years ago • 7 comments

cpovirk avatar May 20 '19 15:05 cpovirk

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).

cgruber avatar Jul 09 '19 17:07 cgruber

I'll roll a PR. We updated it to 1.0, as we just upgraded internally, so the current code should be appropriate.

cgruber avatar Jul 09 '19 17:07 cgruber

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?

cgruber avatar Jul 09 '19 17:07 cgruber

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.

cgruber avatar Jul 09 '19 19:07 cgruber

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.)

cpovirk avatar Jul 10 '19 18:07 cpovirk

Cool. Pretty close. Found some un-handled edge cases which I figured I'd fix on the way. Just fixing up the readme now.

cgruber avatar Jul 10 '19 23:07 cgruber

This would be nice, especially for a project migrating from AssertJ where field by field comparisons are available 👍

MorrisonCole avatar Nov 13 '19 00:11 MorrisonCole