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

Document usage of state in @PactVerification #384

Closed
fitzoh opened this issue Feb 26, 2017 · 2 comments
Closed

Document usage of state in @PactVerification #384

fitzoh opened this issue Feb 26, 2017 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@fitzoh
Copy link
Contributor

fitzoh commented Feb 26, 2017

In the example message consumer test

The following block is present:

    @Test
    @PactVerification({"test_provider", "SomeProviderState"})
    public void test() throws Exception {
        Assert.assertNotNull(new String(currentMessage));
    }

The javadoc for @PactVerification makes no mention of passing in the state.

    /**
     * the tested provider name.
     */
    String[] value() default "";

The documentation on the annotation should be updated to explain that the state can be passed in as a value, or the example should be updated.

@uglyog
Copy link
Member

uglyog commented Mar 23, 2017

There are two problems, the example test is wrong and that the annotation can take multiple provider names as only the first one will be used.

@uglyog uglyog added the bug Indicates an unexpected problem or unintended behavior label Mar 23, 2017
@uglyog
Copy link
Member

uglyog commented Aug 7, 2021

I've corrected the examples. @PactVerification does support multiple values, but they are the provider names.

@uglyog uglyog closed this as completed Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants