blob: 255bd2fceecff427e523e9ff737d029e8ac2fafb [file] [log] [blame]
Amit Hilbuchdd9390c2018-11-13 16:26:05 -08001/*
2 * Copyright 2018 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
Steve Anton10542f22019-01-11 09:11:00 -080011#ifndef PC_TEST_MOCK_CHANNEL_INTERFACE_H_
12#define PC_TEST_MOCK_CHANNEL_INTERFACE_H_
Amit Hilbuchdd9390c2018-11-13 16:26:05 -080013
14#include <string>
Amit Hilbuchbcd39d42019-01-25 17:13:56 -080015#include <vector>
Amit Hilbuchdd9390c2018-11-13 16:26:05 -080016
Steve Anton10542f22019-01-11 09:11:00 -080017#include "pc/channel_interface.h"
Amit Hilbuchdd9390c2018-11-13 16:26:05 -080018#include "test/gmock.h"
19
20namespace cricket {
21
22// Mock class for BaseChannel.
23// Use this class in unit tests to avoid dependecy on a specific
24// implementation of BaseChannel.
25class MockChannelInterface : public cricket::ChannelInterface {
26 public:
27 MOCK_CONST_METHOD0(media_type, cricket::MediaType());
28 MOCK_CONST_METHOD0(media_channel, MediaChannel*());
29 MOCK_CONST_METHOD0(transport_name, const std::string&());
30 MOCK_CONST_METHOD0(content_name, const std::string&());
31 MOCK_CONST_METHOD0(enabled, bool());
32 MOCK_METHOD1(Enable, bool(bool));
33 MOCK_METHOD0(SignalFirstPacketReceived,
34 sigslot::signal1<ChannelInterface*>&());
35 MOCK_METHOD3(SetLocalContent,
36 bool(const cricket::MediaContentDescription*,
37 webrtc::SdpType,
38 std::string*));
39 MOCK_METHOD3(SetRemoteContent,
40 bool(const cricket::MediaContentDescription*,
41 webrtc::SdpType,
42 std::string*));
Amit Hilbuchbcd39d42019-01-25 17:13:56 -080043 MOCK_CONST_METHOD0(local_streams, const std::vector<StreamParams>&());
44 MOCK_CONST_METHOD0(remote_streams, const std::vector<StreamParams>&());
Amit Hilbuchdd9390c2018-11-13 16:26:05 -080045 MOCK_METHOD1(SetRtpTransport, bool(webrtc::RtpTransportInternal*));
46};
47
48} // namespace cricket
49
Steve Anton10542f22019-01-11 09:11:00 -080050#endif // PC_TEST_MOCK_CHANNEL_INTERFACE_H_