Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom record (object) differ #16

Open
jatcwang opened this issue Aug 23, 2021 · 0 comments
Open

Custom record (object) differ #16

jatcwang opened this issue Aug 23, 2021 · 0 comments

Comments

@jatcwang
Copy link
Owner

Sometimes we have a record-like class which we'll want to compare a subset of fields.

e.g.

class MyError(field1: String, field2: List[String], cause: Throwable) extends Exception we may only want to compare msg since cause isn't something we can/want to compare.

Ideally we can have have an easy way to create custom record differs, maybe something like:

val differ = Differ.customObj(_.msg, _.field2)

where customObj is overloaded to accept any number of params.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant