blob: 934b9a067ce18ba9e305575a13afd79e9b2394fa [file] [log] [blame]
Patrick Venturea67a9472018-12-19 07:29:43 -08001#include "env_mock.hpp"
2
3// Set this before each test that hits a call to getEnv().
4EnvInterface* envIntf = nullptr;
5
6namespace env
7{
8
9std::string getEnv(const char* key)
10{
11 return (envIntf) ? envIntf->getEnv(key) : "";
12}
13
14std::string getEnv(const char* prefix, const SensorSet::key_type& sensor)
15{
16 return (envIntf) ? envIntf->getEnv(prefix, sensor) : "";
17}
18
19std::string getEnv(const char* prefix, const std::string& type,
20 const std::string& id)
21{
22 return (envIntf) ? envIntf->getEnv(prefix, type, id) : "";
23}
24
25std::string getIndirectID(std::string path, const std::string& fileSuffix,
26 const SensorSet::key_type& sensor)
27{
28 return (envIntf) ? envIntf->getIndirectID(path, fileSuffix, sensor) : "";
29}
30
31} // namespace env