#ifndef COMPONENTS_POLICY_CORE_COMMON_MOCK_POLICY_SERVICE_H_
#define COMPONENTS_POLICY_CORE_COMMON_MOCK_POLICY_SERVICE_H_
#include "components/policy/core/common/policy_service.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace policy {
class MockPolicyServiceObserver : public PolicyService::Observer {
public:
MockPolicyServiceObserver();
virtual ~MockPolicyServiceObserver();
MOCK_METHOD3(OnPolicyUpdated, void(const PolicyNamespace&,
const PolicyMap& previous,
const PolicyMap& current));
MOCK_METHOD1(OnPolicyServiceInitialized, void(PolicyDomain));
};
class MockPolicyService : public PolicyService {
public:
MockPolicyService();
virtual ~MockPolicyService();
MOCK_METHOD2(AddObserver, void(PolicyDomain, Observer*));
MOCK_METHOD2(RemoveObserver, void(PolicyDomain, Observer*));
MOCK_CONST_METHOD1(GetPolicies, const PolicyMap&(const PolicyNamespace&));
MOCK_CONST_METHOD1(IsInitializationComplete, bool(PolicyDomain domain));
MOCK_METHOD1(RefreshPolicies, void(const base::Closure&));
};
}
#endif