update_engine: Standarize mock/fake filenames.
Mock classes implement mostly MOCK_METHOD* methods used with gmock.
Those classes should be named with the prefix "Mock" in the class
name and "mock_" in the header filename.
Fake classes implement a working version of the interface they provide,
often with extra functionality to change their behavior. Those classes
should be prefixed with "Fake" in the class name and "fake_" in the
file name.
Other minor include order fixes are included in this patch.
BUG=None
TEST=Unittest still pass.
Change-Id: I23de7cb11e25182d5855afacca47d431c97b82bb
Reviewed-on: https://chromium-review.googlesource.com/227779
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/fake_system_state.h b/fake_system_state.h
index 520b1a0..84c37fc 100644
--- a/fake_system_state.h
+++ b/fake_system_state.h
@@ -17,8 +17,8 @@
#include "update_engine/mock_omaha_request_params.h"
#include "update_engine/mock_p2p_manager.h"
#include "update_engine/mock_payload_state.h"
+#include "update_engine/mock_prefs.h"
#include "update_engine/mock_update_attempter.h"
-#include "update_engine/prefs_mock.h"
#include "update_engine/system_state.h"
#include "update_engine/update_manager/fake_update_manager.h"
@@ -163,12 +163,12 @@
return &mock_metrics_lib_;
}
- inline testing::NiceMock<PrefsMock> *mock_prefs() {
+ inline testing::NiceMock<MockPrefs> *mock_prefs() {
CHECK(prefs_ == &mock_prefs_);
return &mock_prefs_;
}
- inline testing::NiceMock<PrefsMock> *mock_powerwash_safe_prefs() {
+ inline testing::NiceMock<MockPrefs> *mock_powerwash_safe_prefs() {
CHECK(powerwash_safe_prefs_ == &mock_powerwash_safe_prefs_);
return &mock_powerwash_safe_prefs_;
}
@@ -204,8 +204,8 @@
testing::NiceMock<MockConnectionManager> mock_connection_manager_;
FakeHardware fake_hardware_;
testing::NiceMock<MetricsLibraryMock> mock_metrics_lib_;
- testing::NiceMock<PrefsMock> mock_prefs_;
- testing::NiceMock<PrefsMock> mock_powerwash_safe_prefs_;
+ testing::NiceMock<MockPrefs> mock_prefs_;
+ testing::NiceMock<MockPrefs> mock_powerwash_safe_prefs_;
testing::NiceMock<MockPayloadState> mock_payload_state_;
testing::NiceMock<MockUpdateAttempter> mock_update_attempter_;
testing::NiceMock<MockOmahaRequestParams> mock_request_params_;