UserManagerMock.cpp 632 B

12345678910111213
  1. #include "../include/UserManager.h"
  2. void UserManager::init(const std::string &file) {}
  3. bool UserManager::isAllowed(const std::string &name, const std::string &pw) { return name == "positive" && pw == "positive"; }
  4. bool UserManager::addUser(const std::string &name, const std::string &pw) { return name == "positive" && pw == "positive"; }
  5. bool UserManager::deleteUser(const std::string &name, const std::string &pw) { return name == "positive" && pw == "positive"; }
  6. void UserManager::readFromFile(std::map<std::string, std::string> &user_map) {}
  7. void UserManager::writeToFile(std::map<std::string, std::string> &user_map) {}