Skip to content

Feature: Reuse HttpClientResponseBuilder for verification #41

@ipichris

Description

@ipichris

Currently i have to rewrite the mock rule to verify the number of calls. I.e.:

mock.onPost().withPath(Matchers.containsString("/something")).doReturn(HttpStatus.SC_OK, "777");
[...]
mock.verify().post().withPath(Matchers.containsString("/something")).called(1);

Especially when using complex rules this is time consuming and a maintenance issue.
I would like to reuse the rule, for example like this:

HttpClientResponseBuilder builder = mock.onPost().withPath(Matchers.containsString("/something")).doReturn(HttpStatus.SC_OK, "777");;
[...]
mock.verify(builder).called(1);

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