xref: /openbmc/phosphor-user-manager/test/mock_user_mgr.hpp (revision b3ef4e1a3de7630c4b4ac5f7447da81c439e88a9)
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_METHOD1(getLdapGroupName, std::string(const std::string& userName));
19     MOCK_METHOD0(getPrivilegeMapperObject, DbusUserObj());
20     MOCK_METHOD1(userLockedForFailedAttempt, bool(const std::string& userName));
21     MOCK_METHOD1(userPasswordExpired, bool(const std::string& userName));
22 
23     friend class TestUserMgr;
24 };
25 
26 } // namespace user
27 } // namespace phosphor
28