blob: a140f0c6a845d9083ee30d1f29cdb50b8614865d [file] [log] [blame]
Paul Stewarte6927402012-01-23 16:11:30 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Paul Stewartc2350ee2011-10-19 12:28:40 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_MOCK_TIME_H_
6#define SHILL_MOCK_TIME_H_
7
Wade Guthrie7c2d34e2013-05-09 14:02:20 -07008#include "shill/shill_time.h"
9
Paul Stewartc2350ee2011-10-19 12:28:40 -070010#include <base/basictypes.h>
11#include <gmock/gmock.h>
12
Paul Stewartc2350ee2011-10-19 12:28:40 -070013namespace shill {
14
15class MockTime : public Time {
16 public:
17 MockTime();
18 virtual ~MockTime();
19
Paul Stewarte6927402012-01-23 16:11:30 -080020 MOCK_METHOD1(GetTimeMonotonic, int(struct timeval *tv));
Paul Stewartc2350ee2011-10-19 12:28:40 -070021 MOCK_METHOD2(GetTimeOfDay, int(struct timeval *tv, struct timezone *tz));
Darin Petkov0c65bdd2012-12-05 13:42:41 +010022 MOCK_METHOD0(GetNow, Timestamp());
Wade Guthrie7c2d34e2013-05-09 14:02:20 -070023 MOCK_CONST_METHOD0(GetSecondsSinceEpoch, time_t());
Paul Stewartc2350ee2011-10-19 12:28:40 -070024
25 private:
26 DISALLOW_COPY_AND_ASSIGN(MockTime);
27};
28
29} // namespace shill
30
31#endif // SHILL_MOCK_TIME_H_