Simulations of dissipative galaxy formation in hierarchically clustering universes - I: Tests of the code | Synapse