blob: 934b9a067ce18ba9e305575a13afd79e9b2394fa [file] [log] [blame]
#include "env_mock.hpp"
// Set this before each test that hits a call to getEnv().
EnvInterface* envIntf = nullptr;
namespace env
{
std::string getEnv(const char* key)
{
return (envIntf) ? envIntf->getEnv(key) : "";
}
std::string getEnv(const char* prefix, const SensorSet::key_type& sensor)
{
return (envIntf) ? envIntf->getEnv(prefix, sensor) : "";
}
std::string getEnv(const char* prefix, const std::string& type,
const std::string& id)
{
return (envIntf) ? envIntf->getEnv(prefix, type, id) : "";
}
std::string getIndirectID(std::string path, const std::string& fileSuffix,
const SensorSet::key_type& sensor)
{
return (envIntf) ? envIntf->getIndirectID(path, fileSuffix, sensor) : "";
}
} // namespace env