Leosac  0.8.0
Open Source Access Control
TestHelper.hpp File Reference
#include "FakeGPIO.hpp"
#include "core/CoreUtils.hpp"
#include "core/MessageBus.hpp"
#include "core/config/ConfigChecker.hpp"
#include "gtest/gtest.h"
#include <boost/property_tree/ptree.hpp>
#include <zmqpp/zmqpp.hpp>
+ Include dependency graph for TestHelper.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Leosac::Test::Helper::TestHelper
 Base class for test fixtures, it defines a ZMQ context, a BUS and a sub socket connect to the bus. More...
 

Namespaces

 Leosac
 This is the header file for a generated source file, GitSHA1.cpp.
 
 Leosac::Test
 Unit test live in this namespace.
 
 Leosac::Test::Helper
 Unit testing utility class that helps writing test.
 

Functions

template<typename ModuleType >
bool Leosac::Test::Helper::test_run_module (zmqpp::context *ctx, zmqpp::socket *pipe, const boost::property_tree::ptree &cfg)
 Helper function that create an object of type ModuleType (using conventional parameter) and run it. More...
 
bool Leosac::Test::Helper::bus_read_extract (zmqpp::message *)
 Part of the bus_read() stuff. More...
 
template<typename... Content>
bool Leosac::Test::Helper::bus_read_extract (zmqpp::message *m, const char *first_arg, Content... content)
 Frame extraction method specialized (thanks to overloading) for const char * More...
 
template<typename T , typename... Content>
std::enable_if<!std::is_same< const char *, T >::value, bool >::type Leosac::Test::Helper::bus_read_extract (zmqpp::message *m, T first_arg, Content... content)
 Default frame extraction function. More...
 
template<typename... Content>
bool Leosac::Test::Helper::bus_read (zmqpp::socket &sub, Content... content)
 Make a blocking read on the bus, return true if content match the message. More...