1 #include "user_mgr.hpp" 2 3 #include <gmock/gmock.h> 4 5 namespace phosphor 6 { 7 namespace user 8 { 9 10 constexpr auto objpath = "/dummy/user"; 11 12 class MockManager : public UserMgr 13 { 14 public: 15 MockManager(sdbusplus::bus_t& bus, const char* path) : UserMgr(bus, path) 16 {} 17 18 MOCK_METHOD0(getPrivilegeMapperObject, DbusUserObj()); 19 MOCK_METHOD1(userLockedForFailedAttempt, bool(const std::string& userName)); 20 MOCK_METHOD1(userPasswordExpired, bool(const std::string& userName)); 21 MOCK_CONST_METHOD1(getPrimaryGroup, gid_t(const std::string& userName)); 22 MOCK_CONST_METHOD3(isGroupMember, 23 bool(const std::string& userName, gid_t primaryGid, 24 const std::string& groupName)); 25 26 friend class TestUserMgr; 27 }; 28 29 } // namespace user 30 } // namespace phosphor 31