1 // Copyright 2014 The Chromium OS Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef LIBBRILLO_POLICY_MOCK_LIBPOLICY_H_ 6 #define LIBBRILLO_POLICY_MOCK_LIBPOLICY_H_ 7 8 #include <gmock/gmock.h> 9 #include <set> 10 11 #include "policy/libpolicy.h" 12 13 #pragma GCC visibility push(default) 14 15 namespace policy { 16 17 // This is a generic mock of the PolicyProvider class. 18 class MockPolicyProvider : public PolicyProvider { 19 public: 20 MockPolicyProvider() = default; 21 ~MockPolicyProvider() override = default; 22 23 MOCK_METHOD0(Reload, bool(void)); 24 MOCK_CONST_METHOD0(device_policy_is_loaded, bool(void)); 25 MOCK_CONST_METHOD0(GetDevicePolicy, const DevicePolicy&(void)); 26 MOCK_CONST_METHOD0(IsConsumerDevice, bool(void)); 27 28 private: 29 DISALLOW_COPY_AND_ASSIGN(MockPolicyProvider); 30 }; 31 32 } // namespace policy 33 34 #pragma GCC visibility pop 35 36 #endif // LIBBRILLO_POLICY_MOCK_LIBPOLICY_H_ 37