chromium/net/third_party/quiche/src/quiche/common/test_tools/mock_streams.h

// Copyright (c) 2023 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef QUICHE_COMMON_TEST_TOOLS_MOCK_STREAMS_H_
#define QUICHE_COMMON_TEST_TOOLS_MOCK_STREAMS_H_

#include <algorithm>
#include <cstddef>
#include <string>
#include <utility>

#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/common/quiche_stream.h"

namespace quiche::test {

// Mockable stream that stores all of the data into an std::string by default.
class MockWriteStream : public quiche::WriteStream {};

// Reads stream data from an std::string buffer.
class ReadStreamFromString : public ReadStream {};

}  // namespace quiche::test

#endif  // QUICHE_COMMON_TEST_TOOLS_MOCK_STREAMS_H_