ConfigMock.cpp 327 B

12345678910111213141516171819
  1. #include "../include/Config.h"
  2. namespace Config {
  3. std::map<std::string, std::string> storage;
  4. };
  5. bool Config::init(const std::string &filename) {
  6. return true;
  7. }
  8. std::string Config::getValue(const std::string &key) {
  9. auto it = storage.find(key);
  10. if (it != storage.end()) {
  11. return it->second;
  12. }
  13. return "";
  14. }