1/*
2 *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 *
4 *  Use of this source code is governed by a BSD-style license
5 *  that can be found in the LICENSE file in the root of the source
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
12#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
13
14#include "webrtc/modules/audio_coding/neteq/expand.h"
15
16#include "testing/gmock/include/gmock/gmock.h"
17
18namespace webrtc {
19
20class MockExpand : public Expand {
21 public:
22  MockExpand(BackgroundNoise* background_noise,
23             SyncBuffer* sync_buffer,
24             RandomVector* random_vector,
25             StatisticsCalculator* statistics,
26             int fs,
27             size_t num_channels)
28      : Expand(background_noise,
29               sync_buffer,
30               random_vector,
31               statistics,
32               fs,
33               num_channels) {}
34  virtual ~MockExpand() { Die(); }
35  MOCK_METHOD0(Die, void());
36  MOCK_METHOD0(Reset,
37      void());
38  MOCK_METHOD1(Process,
39      int(AudioMultiVector* output));
40  MOCK_METHOD0(SetParametersForNormalAfterExpand,
41      void());
42  MOCK_METHOD0(SetParametersForMergeAfterExpand,
43      void());
44  MOCK_CONST_METHOD0(overlap_length,
45      size_t());
46};
47
48}  // namespace webrtc
49
50namespace webrtc {
51
52class MockExpandFactory : public ExpandFactory {
53 public:
54  MOCK_CONST_METHOD6(Create,
55                     Expand*(BackgroundNoise* background_noise,
56                             SyncBuffer* sync_buffer,
57                             RandomVector* random_vector,
58                             StatisticsCalculator* statistics,
59                             int fs,
60                             size_t num_channels));
61};
62
63}  // namespace webrtc
64#endif  // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
65