markvincze / Stubbery

Library for creating Api stubs in .NET. https://markvincze.github.io/Stubbery/
MIT License
74 stars 14 forks source link

Unable to find "IfBody" method on ApiStub object #12

Closed Dileep17 closed 6 years ago

Dileep17 commented 6 years ago

Hi!

In doc of the stubbery, I found below. A way to return response based on the body posted.

// Will only respond if the body contains the string "bodyCondition". sut.Post("/testget", (req, args) => "testresponse") .IfBody(s => s.ReadAsString().Contains("bodyCondition"));

There seems to be no IfBody method on ApiStub() object.

Is this replaced with any new method ? Please correct me if Im doing something wrong here!

Thank you in advance.

markvincze commented 6 years ago

Hi @Dileep17,

That feature was removed due to causing some problems, but the documentation wasn't adjusted. I fixed the docs now, and will try to investigate how we can reintroduce this feature.

Cheers, Mark

markvincze commented 6 years ago

Feature was added in #14, released as version 1.4.0 cc @Dileep17