blob: 344029981c8accc45e08b415e35d1e025fb9b2ed [file] [log] [blame]
raviteja-b8cc44052019-02-27 23:29:36 -06001#include "user_mgr.hpp"
Patrick Williams9638afb2021-02-22 17:16:24 -06002
raviteja-b8cc44052019-02-27 23:29:36 -06003#include <gmock/gmock.h>
4
5namespace phosphor
6{
7namespace user
8{
9
10constexpr auto objpath = "/dummy/user";
11
12class MockManager : public UserMgr
13{
14 public:
Patrick Williamsb7043042023-05-10 07:50:52 -050015 MockManager(sdbusplus::bus_t& bus, const char* path) : UserMgr(bus, path) {}
raviteja-b8cc44052019-02-27 23:29:36 -060016
raviteja-b8cc44052019-02-27 23:29:36 -060017 MOCK_METHOD0(getPrivilegeMapperObject, DbusUserObj());
18 MOCK_METHOD1(userLockedForFailedAttempt, bool(const std::string& userName));
Joseph Reynolds3ab6cc22020-03-03 14:09:03 -060019 MOCK_METHOD1(userPasswordExpired, bool(const std::string& userName));
Alexander Filippov75626582022-02-09 18:42:37 +030020 MOCK_CONST_METHOD1(getPrimaryGroup, gid_t(const std::string& userName));
21 MOCK_CONST_METHOD3(isGroupMember,
22 bool(const std::string& userName, gid_t primaryGid,
23 const std::string& groupName));
raviteja-b8cc44052019-02-27 23:29:36 -060024
25 friend class TestUserMgr;
26};
27
28} // namespace user
29} // namespace phosphor