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.
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 comparemsg
sincecause
isn't something we can/want to compare.Ideally we can have have an easy way to create custom record differs, maybe something like:
where customObj is overloaded to accept any number of params.