Unit testing CVS server implementation that provides
constant replies coming from prepared files and
simulates network and server overload failures.
Typical server usage in unit test sequence:
InputStream in = getClass().getResourceAsStream("...");
PseudoCvsServer cvss = new PseudoCvsServer(in);
new Thread(cvss).start();
String cvsRoot = cvss.getCvsRoot();
<client operations>
cvss.stop(); // check test failure
<tested client asserts>
Fake input and output streams can be on Unix systems
catched using nc program. |