Skip to content

Old DSL arrayEachLike -> Lambda DSL matchers are not consistent #1877

@stephen-j-arnold

Description

@stephen-j-arnold

https://github.com/pact-foundation/pact-jvm/blob/master/consumer/src/test/java/au/com/dius/pact/consumer/dsl/LambdaDslJsonArrayTest.java#L768

I'm trying to use arrayEachLike to test any number of occurrences of a specific object structure within an array. The regression with the Lambda DSL from the old, is that, the matchers that are generated only consider the [0]'th element. Whereas in the old DSL the matching is wildcarded [*].

adding assertThat(lambdaPactDsl.getMatchers(), is(pactDslJson.getMatchers())); to the above test fails, when I would expect it to pass - but shows the behavior I'm seeing.

Is there a different way to accomplish arrayEachLike in the new DSL or is this change in behavior unintended? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions