When someone wants to implement network services like accessing documents on a webserver or sending mails to a SMTP server and polling mails from a POP3 server its a common problem to test this funcionallity within unittests. Some developement environments may not have access to appropriate life systems. Also it's not allways applicapable to install and maintain complete server instances for the services needed. And finally no one wants unittests to interfear with production systems.
This package tries to fill this gab by providing services that work out of the box without any installation or complex configuration. (Ok, https needs an appropriate key pair to run...) All configuration that's needed can be done by calling specialized methods on the mock server objects. Also the mock server objects provide methods to gain information about the service call. This way the unittest can verify the transmittet data directly instead of interpreting the servers response. For instance you can use the MockHttpServer without any configuration and then get the Liste of requests received by the MockHttpServer instance and check, if the URI was constructed correctly.
But you can also use each server class as a stand allone server. Each class comes with a main method to start a server instance. This main method takes two optional numeric parameter:
The package provides 4 server instances:
Timothy Truckle
I'm a truckle but I don't like to truckle [Gerd Prokopp, "Wer stielt schon Unterschenkel"]