The problem I try to solve:
How to test client code that calls REST together with real REST server code (in an efficient way)?
Goals:
It would be kind of integration test, but fast and easy
It would allow to detect e. g. bug where client calls REST method with wrong verb (e. g. PUT, but API accepts POST)
I find it overcomplicated to make integration tests with deployment of REST service and then using my API library to call, so I think of replacing it with in-memory unit/integration tests
I find Flurl library useful, so I would like to use it in such test.
Inspiration: https://stackoverflow.com/a/37510032/1453525
My idea: I would like to make my Flurl Api tests against real ApiController running in memory (using HttpServer), not using Flurl HttpTest. I found this technique here: https://stackoverflow.com/a/37510032/1453525 However it requires to build HttpRequest message each time and does not have nice Api for testing. Is it possible to run Flurl code against real in-memory ApiController tests?