blob: 38bf9a7f3c6795a2d993ce3caf60722c97306673 [file] [log] [blame]
Darin Petkov1023a602010-08-30 13:47:51 -07001// Copyright (c) 2010 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
Gilad Arnoldcf175a02014-07-10 16:48:47 -07005#ifndef UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_
6#define UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_
Darin Petkov1023a602010-08-30 13:47:51 -07007
Alex Vakulenkod2779df2014-06-16 13:19:00 -07008#include <string>
9
Darin Petkov1023a602010-08-30 13:47:51 -070010#include "update_engine/update_attempter.h"
11
Gilad Arnold76b2b482014-04-01 13:32:43 -070012#include <gmock/gmock.h>
13
Darin Petkov1023a602010-08-30 13:47:51 -070014namespace chromeos_update_engine {
15
16class UpdateAttempterMock : public UpdateAttempter {
17 public:
Gilad Arnold76b2b482014-04-01 13:32:43 -070018 using UpdateAttempter::UpdateAttempter;
Darin Petkov1023a602010-08-30 13:47:51 -070019
Gilad Arnoldec7f9162014-07-15 13:24:46 -070020 MOCK_METHOD6(Update, void(const std::string& app_version,
Andrew de los Reyes45168102010-11-22 11:13:50 -080021 const std::string& omaha_url,
Gilad Arnoldec7f9162014-07-15 13:24:46 -070022 const std::string& target_channel,
23 const std::string& target_version_prefix,
Andrew de los Reyesfb2f4612011-06-09 18:21:49 -070024 bool obey_proxies,
Nam T. Nguyen7d623eb2014-05-13 16:06:28 -070025 bool interactive));
Gilad Arnold76b2b482014-04-01 13:32:43 -070026
27 MOCK_METHOD5(GetStatus, bool(int64_t* last_checked_time,
28 double* progress,
29 std::string* current_operation,
30 std::string* new_version,
31 int64_t* new_size));
32
33 MOCK_METHOD1(GetBootTimeAtUpdate, bool(base::Time* out_boot_time));
Gilad Arnolda6dab942014-04-25 11:46:03 -070034
35 MOCK_CONST_METHOD0(consecutive_failed_update_checks, unsigned int(void));
Gilad Arnolda0258a52014-07-10 16:21:19 -070036
37 MOCK_CONST_METHOD0(server_dictated_poll_interval, unsigned int(void));
Darin Petkov1023a602010-08-30 13:47:51 -070038};
39
40} // namespace chromeos_update_engine
41
Gilad Arnoldcf175a02014-07-10 16:48:47 -070042#endif // UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_