Re: Problem with mocks generating

Hi Petr,

A header file might contain multiple classes and a single Mock.h file will be generated containing multiple classes as well.

You only need to include generated/TrackerRequestSessionMock.h in your test module it will contain both class TrackerRequestSessionMock and TrackerRequestSessionStatusMock.

Btw, make sure you rm Makefile* so that the dependencies that would create the mock header are put in place! qmake will scan the dependencies of each file only when creating the Makefiles. If you add an #include, the dependencies of the file will not be automatically rescanned.

Regards,

Peter

Would you like to post a relpy?


This post is a reply to:
Problem with mocks generating
Hi Peter, I've started the TrackerRequestSession class implementation, but I've got an issue with mocks generating. I've done exactly what's in the manual and I've also write everything according to (more...)

Follow-ups:
Re: Problem with mocks generating
The problem was that I had #include "generated/TrackerRequestSessionStatusMock.h" instead of #include "generated/TrackerRequestSessionMock.h" in the TrackerRequestSessionTest file. Thanks again for help and fast reply! Petr