volkszaehler/vzlogger — pull request #92 by mbehr1 (2014-12-31 13:37:06+00:00)
Title: added googlemock framework

From the googlemock wiki:
„...With Google Mock, you can create mocks in C++ easily. ...

When you write a test without using mocks, you exercise the code and assert that it returns the correct value or that the system is in an expected state. This is sometimes called "state-based testing".

Mocks are great for what some call "interaction-based" testing: instead of checking the system state at the very end, mock objects verify that they are invoked the right way and report an error as soon as it arises, giving you a handle on the precise context in which the error was triggered. This is often more effective and economical to do than state-based testing…."

An example for vzlogger could be:
test the behavior of class MeterMap but using mocks for the Meter and Channel that e.g. can easily simulate errors on open(),… check whether all enabled ones are started but disabled one are not started,… (so basically checking the interface between two/multiple classes).

Replaces #60.