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: |
| 15 | MockManager(sdbusplus::bus::bus& bus, const char* path) : |
| 16 | UserMgr(bus, objpath) |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 17 | {} |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 18 | |
| 19 | MOCK_METHOD1(getLdapGroupName, std::string(const std::string& userName)); |
| 20 | MOCK_METHOD0(getPrivilegeMapperObject, DbusUserObj()); |
| 21 | MOCK_METHOD1(userLockedForFailedAttempt, bool(const std::string& userName)); |
Joseph Reynolds | 3ab6cc2 | 2020-03-03 14:09:03 -0600 | [diff] [blame] | 22 | MOCK_METHOD1(userPasswordExpired, bool(const std::string& userName)); |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 23 | |
| 24 | friend class TestUserMgr; |
| 25 | }; |
| 26 | |
| 27 | } // namespace user |
| 28 | } // namespace phosphor |