Rename MockSystemState into FakeSystemState.
This class is no longer a mock. The change also includes renaming the
appropriate files and the instances of this class.
BUG=chromium:358278
TEST=Unit tests.
Change-Id: Ifc20ead0d624eddf8827a6e6f39cd9b9207dcabf
Reviewed-on: https://chromium-review.googlesource.com/194088
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
diff --git a/fake_system_state.cc b/fake_system_state.cc
new file mode 100644
index 0000000..a4fbbeb
--- /dev/null
+++ b/fake_system_state.cc
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "update_engine/fake_system_state.h"
+#include "update_engine/policy_manager/fake_state.h"
+
+using chromeos_policy_manager::FakeState;
+
+namespace chromeos_update_engine {
+
+// Mock the SystemStateInterface so that we could lie that
+// OOBE is completed even when there's no such marker file, etc.
+FakeSystemState::FakeSystemState()
+ : mock_connection_manager_(this),
+ mock_update_attempter_(this, &dbus_),
+ default_request_params_(this),
+ clock_(&fake_clock_),
+ connection_manager_(&mock_connection_manager_),
+ hardware_(&fake_hardware_),
+ metrics_lib_(&mock_metrics_lib_),
+ prefs_(&mock_prefs_),
+ powerwash_safe_prefs_(&mock_powerwash_safe_prefs_),
+ payload_state_(&mock_payload_state_),
+ gpio_handler_(&mock_gpio_handler_),
+ update_attempter_(&mock_update_attempter_),
+ request_params_(&default_request_params_),
+ p2p_manager_(&mock_p2p_manager_),
+ policy_manager_(&fake_policy_manager_),
+ device_policy_(nullptr),
+ fake_system_rebooted_(false) {
+ mock_payload_state_.Initialize(this);
+ mock_update_attempter_.Init();
+ fake_policy_manager_.Init(FakeState::Construct());
+}
+
+} // namespace chromeos_update_engine