rest-assured-net icon indicating copy to clipboard operation
rest-assured-net copied to clipboard

Add support for WireMock.Net matchers

Open StefH opened this issue 3 years ago • 2 comments

Hi Bas, just a remark...

Instead of using NHamcrest to do the matching, you could also use the WireMock.Net matchers: https://github.com/WireMock-Net/WireMock.Net/tree/master/src/WireMock.Net/Matchers

StefH avatar Oct 22 '22 08:10 StefH

Thank you for the suggestion, Stef. At first glance it shouldn’t be too hard to do, so I’ll add it to the list.

basdijkstra avatar Oct 22 '22 09:10 basdijkstra

The only thing which differs is that WireMock.Net does not have any static new helper methods / fluent helper methods yet.

So in Hamcrest you can do:

  ...
  .Body(NHamcrest.Is.EqualTo("California"));

For now the equivalent using WireMock is:

  ...
  .Body(new ExactMatcher("California"));

A possible fluent interface for WireMock could be:

  ...
  .Body(WireMockMatcher.Is.EqualTo("California"));

StefH avatar Oct 22 '22 09:10 StefH