Hi all,
A colleague of mine is writing some client code and he wants to do the right thing by putting together unit tests around his client. He asked me about mocking Connection and to be honest I couldn't give him a good answer.

I took a look at the qpid::messaging code and noticed the ProtocolRegistry code and my guess is that it would probably be possible to write mock classes and use this mechanism to register factories for them and have qpid::messaging::Connection use that as a concrete class - from quickly looking at the code this seems to be the way that the AMQP 0.10 and AMQP 1.0 concrete implementations are selected, so that all seems plausible.

Unfortunately however my colleague is stuck on Qpid 0.18 and I'd guess that the ProtocolRegistry code is a lot more recent, probably put in to support AMQP 1.0, so probably Qpid 0.20 at the earliest.

So my question really is: has anyone looked at doing pure unit tests of qpid client code and if so what approach have they taken to mocking out implementation code - I'm particularly interested in 0.18, but I guess if anyone has thought about it for more up to date releases that'd still be useful.

MTIA,
Frase

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to