1 /*
2  * Copyright (c) Facebook, Inc. and its affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  *
7  */
8 
9 #pragma once
10 
11 #include <folly/portability/GMock.h>
12 #include <quic/dsr/frontend/PacketBuilder.h>
13 
14 namespace quic::test {
15 
16 class MockDSRPacketBuilder : public DSRPacketBuilderBase {
17  public:
18   GMOCK_METHOD0_(, noexcept, , remainingSpaceNonConst, size_t());
19 
remainingSpace()20   size_t remainingSpace() const noexcept override {
21     return const_cast<MockDSRPacketBuilder&>(*this).remainingSpaceNonConst();
22   }
23 
24   MOCK_METHOD2(addSendInstruction, void(SendInstruction&&, uint32_t));
25 };
26 
27 } // namespace quic::test
28