Skip to content

Infer feature name for method references in hasFeature #6

@markhobson

Description

@markhobson

When using ComposeMatchers.hasFeature(Function, Matcher) the feature name defaults to the string representation of the supplied function. For method references this results in something unwieldy like the following:

org.hobsoft.hamcrest.compose.demo.Main$$Lambda$1/424058530@31befd9f

Ideally we would infer the method name from the method reference and use that instead. Furthermore we could translate method names to English property names, e.g. getFirstName to first name.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions