blob: 7f71fa992cba857ce87cb09069d66034e6335d4a [file] [log] [blame]
Jay Srinivasan08fce042012-06-07 16:31:01 -07001// Copyright (c) 2012 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_SYSTEM_STATE_H__
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_SYSTEM_STATE_H__
7
8#include <gmock/gmock.h>
9
Jay Srinivasan43488792012-06-19 00:25:31 -070010#include <policy/mock_device_policy.h>
11#include "update_engine/system_state.h"
Jay Srinivasan08fce042012-06-07 16:31:01 -070012
13namespace chromeos_update_engine {
14
15// Mock the SystemStateInterface so that we could lie that
16// OOBE is completed even when there's no such marker file, etc.
17class MockSystemState : public SystemState {
Jay Srinivasan43488792012-06-19 00:25:31 -070018 public:
19 MockSystemState() {}
20 virtual ~MockSystemState() {}
21
22 MOCK_METHOD0(IsOOBEComplete, bool());
23 MOCK_METHOD1(SetDevicePolicy, void(const policy::DevicePolicy*));
24 MOCK_CONST_METHOD0(GetDevicePolicy, const policy::DevicePolicy*());
25
26 void SetConnectionManager(ConnectionManager* connection_manager) {
27 connection_manager_ = connection_manager;
28 }
29
30 virtual ConnectionManager* GetConnectionManager() {
31 return connection_manager_;
32 }
33
34 private:
35 ConnectionManager* connection_manager_;
Jay Srinivasan08fce042012-06-07 16:31:01 -070036};
37
38} // namespeace chromeos_update_engine
39
40#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_SYSTEM_STATE_H__