chromium/third_party/openscreen/src/cast/common/channel/virtual_connection_router_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cast/common/channel/virtual_connection_router.h"

#include <utility>

#include "cast/common/channel/connection_namespace_handler.h"
#include "cast/common/channel/message_util.h"
#include "cast/common/channel/proto/cast_channel.pb.h"
#include "cast/common/channel/testing/fake_cast_socket.h"
#include "cast/common/channel/testing/mock_cast_message_handler.h"
#include "cast/common/channel/testing/mock_socket_error_handler.h"
#include "cast/common/public/cast_socket.h"
#include "gtest/gtest.h"

namespace openscreen::cast {
namespace {

static_assert;
static_assert;
static_assert;
static_assert;

CastMessage;
_;
Invoke;
SaveArg;
WithArg;

class VirtualConnectionRouterTest : public ::testing::Test {};

}  // namespace

TEST_F(VirtualConnectionRouterTest, NoConnections) {}

TEST_F(VirtualConnectionRouterTest, AddConnections) {}

TEST_F(VirtualConnectionRouterTest, RemoveConnections) {}

TEST_F(VirtualConnectionRouterTest, RemoveConnectionsByIds) {}

TEST_F(VirtualConnectionRouterTest, LocalIdHandler) {}

TEST_F(VirtualConnectionRouterTest, RemoveLocalIdHandler) {}

TEST_F(VirtualConnectionRouterTest, SendMessage) {}

TEST_F(VirtualConnectionRouterTest, CloseSocketRemovesVirtualConnections) {}

// Tests that VirtualConnectionRouter::Send() broadcasts a message from a local
// source to both: 1) all other local peers; and 2) all remote peers.
TEST_F(VirtualConnectionRouterTest, BroadcastsFromLocalSource) {}

// Tests that VirtualConnectionRouter::OnMessage() broadcasts a message from a
// remote source to all local peers.
TEST_F(VirtualConnectionRouterTest, BroadcastsFromRemoteSource) {}

// Tests that the VirtualConnectionRouter treats kConnectionNamespace messages
// as a special case. The details of this are described in the implementation of
// VirtualConnectionRouter::OnMessage().
TEST_F(VirtualConnectionRouterTest, HandlesConnectionMessagesAsSpecialCase) {}

}  // namespace openscreen::cast