xref: /aosp_15_r20/external/webrtc/api/test/mock_session_description_interface.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright 2022 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 API_TEST_MOCK_SESSION_DESCRIPTION_INTERFACE_H_
12 #define API_TEST_MOCK_SESSION_DESCRIPTION_INTERFACE_H_
13 
14 #include <memory>
15 #include <string>
16 #include <utility>
17 #include <vector>
18 
19 #include "api/jsep.h"
20 #include "test/gmock.h"
21 
22 namespace webrtc {
23 
24 class MockSessionDescriptionInterface : public SessionDescriptionInterface {
25  public:
26   MOCK_METHOD(std::unique_ptr<SessionDescriptionInterface>,
27               Clone,
28               (),
29               (const, override));
30   MOCK_METHOD(cricket::SessionDescription*, description, (), (override));
31   MOCK_METHOD(const cricket::SessionDescription*,
32               description,
33               (),
34               (const, override));
35   MOCK_METHOD(std::string, session_id, (), (const, override));
36   MOCK_METHOD(std::string, session_version, (), (const, override));
37   MOCK_METHOD(SdpType, GetType, (), (const, override));
38   MOCK_METHOD(std::string, type, (), (const, override));
39   MOCK_METHOD(bool, AddCandidate, (const IceCandidateInterface*), (override));
40   MOCK_METHOD(size_t,
41               RemoveCandidates,
42               (const std::vector<cricket::Candidate>&),
43               (override));
44   MOCK_METHOD(size_t, number_of_mediasections, (), (const, override));
45   MOCK_METHOD(const IceCandidateCollection*,
46               candidates,
47               (size_t),
48               (const, override));
49   MOCK_METHOD(bool, ToString, (std::string*), (const, override));
50 };
51 
52 static_assert(!std::is_abstract_v<MockSessionDescriptionInterface>);
53 
54 }  // namespace webrtc
55 
56 #endif  // API_TEST_MOCK_SESSION_DESCRIPTION_INTERFACE_H_
57