#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/openscreen_platform/tls_client_connection.h"
#include <cstring>
#include <iterator>
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Mock;
StrictMock;
namespace openscreen_platform {
Error;
TlsConnection;
namespace {
const openscreen::IPEndpoint kValidEndpointOne{ … };
const openscreen::IPEndpoint kValidEndpointTwo{ … };
constexpr int kDataPipeCapacity = …;
const uint8_t kTestMessage[] = …;
class FakeSocketStreams { … };
class MockTlsConnectionClient : public TlsConnection::Client { … };
}
class TlsClientConnectionTest : public ::testing::Test { … };
TEST_F(TlsClientConnectionTest, CallsClientOnReadForInboundData) { … }
TEST_F(TlsClientConnectionTest, CallsClientOnErrorWhenSocketInboundCloses) { … }
TEST_F(TlsClientConnectionTest, SendsUntilBlocked) { … }
TEST_F(TlsClientConnectionTest,
CallsClientOnErrorWhenSendingToClosedOutboundStream) { … }
TEST_F(TlsClientConnectionTest, CanRetrieveAddresses) { … }
}