[Interest] Fwd: Is there a way to mock the QNAM?
Richard Moore
rich at kde.org
Sat Sep 7 13:19:08 CEST 2013
On 7 September 2013 10:58, Alejandro Exojo <suy at badopi.org> wrote:
> El Martes, 3 de septiembre de 2013, André Somers escribió:
>> It's an example of good API design, if you ask me: the public API to use
>> is not the same as the (protected) API to extend the class. These are
>> different tasks, and they should have a different API.
>
> I'm not the original poster, but, could you guys elaborate more on how to do
> this?
>
> In my case is possibly different, since we use either a socket or a serial port
> to implement some protocol through it. Unless we override in the test the
> function that instantiates suck socket/serial port to provide a "mock"
> QIODevice, I don't see how to do it.
I've written a few blog posts about using custom network replies, see
http://blogs.kde.org/2010/06/05/white-listing-qnetworkaccessmanager
Regards
Rich.
More information about the Interest
mailing list