blob: cf2a486c19314e21d9aedb98706f8060e4809e87 [file] [log] [blame]
Darin Petkovf1e85e42010-06-10 15:59:53 -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
5#ifndef METRICS_COUNTER_MOCK_H_
6#define METRICS_COUNTER_MOCK_H_
7
8#include <string>
9
10#include <gmock/gmock.h>
11
12#include "counter.h"
13
14namespace chromeos_metrics {
15
Ken Mixter4c5daa42010-08-26 18:35:06 -070016class TaggedCounterMock : public TaggedCounter {
Darin Petkovf1e85e42010-06-10 15:59:53 -070017 public:
18 MOCK_METHOD3(Init, void(const char* filename,
19 Reporter reporter, void* reporter_handle));
20 MOCK_METHOD2(Update, void(int tag, int count));
21 MOCK_METHOD0(Flush, void());
22};
23
Ken Mixter4c5daa42010-08-26 18:35:06 -070024class TaggedCounterReporterMock : public TaggedCounterReporter {
25 public:
26 MOCK_METHOD5(Init, void(const char* filename,
27 const char* histogram_name,
28 int min,
29 int max,
30 int nbuckets));
31 MOCK_METHOD2(Update, void(int32 tag, int32 count));
32 MOCK_METHOD0(Flush, void());
33};
34
Ken Mixterccd84c02010-08-16 19:57:13 -070035class FrequencyCounterMock : public FrequencyCounter {
36 public:
37 MOCK_METHOD4(Init, void(const char* filename,
38 TaggedCounterInterface::Reporter reporter,
39 void* reporter_handle,
40 time_t cycle_duration));
41 MOCK_METHOD1(Update, void(int32 count));
Ken Mixter4c5daa42010-08-26 18:35:06 -070042 MOCK_METHOD0(FlushFinishedCycles, void());
Ken Mixterccd84c02010-08-16 19:57:13 -070043};
44
Darin Petkovf1e85e42010-06-10 15:59:53 -070045} // namespace chromeos_metrics
46
47#endif // METRICS_COUNTER_MOCK_H_