AU: Start an UpdateAttempter unit test suite.
This increases the UpdateAttmpter line coverage to almost 40%. More is needed
but this is a good starting point / checkpoint. Also some UpdateCheckScheduler
unit test cleanup.
BUG=6243
TEST=unit tests, gmerge on device
Change-Id: I39c80de3f18095c4a28cb36ab868bed6d7073824
Review URL: http://codereview.chromium.org/3259011
diff --git a/action_mock.h b/action_mock.h
new file mode 100644
index 0000000..4ebafba
--- /dev/null
+++ b/action_mock.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2010 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.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_MOCK_H__
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_MOCK_H__
+
+#include <gmock/gmock.h>
+
+#include "update_engine/action.h"
+
+namespace chromeos_update_engine {
+
+class ActionMock;
+
+template<>
+class ActionTraits<ActionMock> {
+ public:
+ typedef NoneType OutputObjectType;
+ typedef NoneType InputObjectType;
+};
+
+class ActionMock : public Action<ActionMock> {
+ public:
+ MOCK_METHOD0(PerformAction, void());
+ MOCK_CONST_METHOD0(Type, std::string());
+};
+
+} // namespace chromeos_update_engine
+
+#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_MOCK_H__