On 12/23/14, 2:08 PM, Adam D. Ruppe wrote:
On Tuesday, 23 December 2014 at 17:01:13 UTC, Russel Winder via
Digitalmars-d wrote:
If there was a way of mocking
(so that you can run integration tests without the actual network)

With my cgi.d, I made a command line interface that triggers the library
the same as a network does. This works even if you compile it with the
embedded http server:

$ ./hellocgi  GET / foo=bar
Cache-Control: private, no-cache="set-cookie"
Expires: 0
Pragma: no-cache
Content-Type: text/html; charset=utf-8

hello


It was really easy for me to implement and it gives easy access to any
function for testing and debugging. It also lets me use the shell as a
kind of web console too.

This is something that often amazes me that everyone doesn't do.

This looks interesting.

How do you specify what the mock should respond?

Reply via email to