raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 1 | #include "user_mgr.hpp" |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 2 | |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 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: |
Patrick Williams | b704304 | 2023-05-10 07:50:52 -0500 | [diff] [blame] | 15 | MockManager(sdbusplus::bus_t& bus, const char* path) : UserMgr(bus, path) {} |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 16 | |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 17 | MOCK_METHOD0(getPrivilegeMapperObject, DbusUserObj()); |
| 18 | MOCK_METHOD1(userLockedForFailedAttempt, bool(const std::string& userName)); |
Joseph Reynolds | 3ab6cc2 | 2020-03-03 14:09:03 -0600 | [diff] [blame] | 19 | MOCK_METHOD1(userPasswordExpired, bool(const std::string& userName)); |
Denis Zlobin | e8edab5 | 2023-09-06 12:26:45 +0000 | [diff] [blame] | 20 | MOCK_METHOD1(isUserEnabled, bool(const std::string& userName)); |
Alexander Filippov | 7562658 | 2022-02-09 18:42:37 +0300 | [diff] [blame] | 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)); |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 25 | |
| 26 | friend class TestUserMgr; |
| 27 | }; |
| 28 | |
| 29 | } // namespace user |
| 30 | } // namespace phosphor |