4#define BOOST_TEST_DYN_LINK
5#define BOOST_TEST_MODULE BackendFactoryTest
6#include <boost/test/unit_test.hpp>
7using namespace boost::unit_test_framework;
10#include "DeviceAccessVersion.h"
14#include <boost/make_shared.hpp>
23 std::string instance, std::map<std::string, std::string> parameters) {
30BOOST_AUTO_TEST_SUITE(BackendFactoryTestSuite)
36 std::string testFilePath =
"./dummies.dmap";
37 std::string oldtestFilePath =
"./oldFileFormat.dmap";
38 std::string invalidtestFilePath =
"./nonExistingDmapFile.dmap";
47 boost::shared_ptr<DeviceBackend> testPtr;
62 boost::shared_ptr<DeviceBackend> testPtr2;
65 BOOST_CHECK(testPtr2 == testPtr);
113 boost::shared_ptr<DeviceBackend> testPtr;
117 BOOST_CHECK(testPtr);
120BOOST_AUTO_TEST_SUITE_END()
static BackendFactory & getInstance()
Static function to get an instance of factory.
void setDMapFilePath(std::string dMapFilePath)
This function sets the _DMapFilePath.
boost::shared_ptr< DeviceBackend > createBackend(const std::string &aliasOrUri)
Create a new backend and return the instance as a shared pointer.
The dummy device opens a mapping file instead of a device, and implements all registers defined in th...
DummyBackend(const std::string &mapFileName, const std::string &dataConsistencyKeyDescriptor="")
static std::string convertPathRelativeToDmapToAbs(std::string const &mapfileName)
Exception thrown when a logic error has occured.
void setDMapFilePath(std::string dmapFilePath)
Set the location of the dmap file.
static boost::shared_ptr< DeviceBackend > createInstance(std::string instance, std::map< std::string, std::string > parameters)
BOOST_AUTO_TEST_CASE(testCreateBackend)