Using wiremock, can I return a body that is dependent on the post request

后端 未结 6 848
盖世英雄少女心
盖世英雄少女心 2021-02-12 20:10

I am trying to test an openid provider class. The openid consumer class is making an http request. I am mocking the response to this request using wiremock. I am trying to mock

6条回答
  •  星月不相逢
    2021-02-12 20:42

    I've never used wiremock. But according to their online documentation you can write a mock that matches URL and Request body parameters. So you should be able to return different mocks depending on the parameters in either the URL itself or embedded in the request body.

提交回复
热议问题