blob: 152347a689bbff65887964b6761e98d2d56ca09a [file] [log] [blame]
Jay Srinivasan55f50c22013-01-10 19:24:35 -08001// 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#include "update_engine/mock_system_state.h"
6#include "update_engine/update_attempter_mock.h"
7
8namespace chromeos_update_engine {
9
10// Mock the SystemStateInterface so that we could lie that
11// OOBE is completed even when there's no such marker file, etc.
Jay Srinivasanae4697c2013-03-18 17:08:08 -070012MockSystemState::MockSystemState()
13 : default_request_params_(this),
14 prefs_(&mock_prefs_) {
David Zeuthenf413fe52013-04-22 14:04:39 -070015 clock_ = &default_clock_;
Jay Srinivasanae4697c2013-03-18 17:08:08 -070016 request_params_ = &default_request_params_;
Jay Srinivasan19409b72013-04-12 19:23:36 -070017 mock_payload_state_.Initialize(this);
Jay Srinivasan55f50c22013-01-10 19:24:35 -080018 mock_gpio_handler_ = new testing::NiceMock<MockGpioHandler>();
19 mock_update_attempter_ = new testing::NiceMock<UpdateAttempterMock>(
20 this, &dbus_);
21}
22
23MockSystemState::~MockSystemState() {
24 delete mock_gpio_handler_;
25}
26
27UpdateAttempter* MockSystemState::update_attempter() {
28 return mock_update_attempter_;
29}
30
31} // namespeace chromeos_update_engine
32