Skip to content

Custom record (object) differ #16

Description

@jatcwang

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions