Skip to content

Expectations

Yauhen Shayunou edited this page Oct 21, 2020 · 1 revision

GodelTech.StoryLine.Wiremock library contains HttpRequestMock expectation which allows to verify that stubbed request was actually performed. In order to define expectation the following methods must be used:

  • Request() defines patterns used to find recorded request. Requests are recorded by Wiremock.
  • Called() specifies expectation regarding number of recorded requests.

Request()

This method has exactly the same functionality as MockHttpRequest action. You can find details on the following page.

Called()

This methods allows to define expected number of requests matching Request() configuration. Here are available configuration options:

  • Never() is used to specify that request was never recorded.
  • Once() specifies that request was recorded once. If request was recorded more then once error is raised.
  • Twice() specifies that request was recorded twice.
  • AtLeastOnce() means that request was recorded one or more times.
  • MoreThanOnce() means that request was recorded two or more times.
  • Exactly() specifies exact number of recorded expected events.
Clone this wiki locally