chromium/third_party/openscreen/src/cast/receiver/application_agent_unittest.cc

// Copyright 2020 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/receiver/application_agent.h"

#include <iomanip>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

#include "cast/common/channel/message_util.h"
#include "cast/common/channel/testing/fake_cast_socket.h"
#include "cast/common/public/message_port.h"
#include "cast/receiver/channel/static_credentials.h"
#include "cast/receiver/channel/testing/device_auth_test_helpers.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "json/writer.h"  // Included to teach gtest how to pretty-print.
#include "platform/api/time.h"
#include "platform/base/span.h"
#include "platform/test/fake_task_runner.h"
#include "platform/test/paths.h"
#include "util/json/json_serialization.h"
#include "util/read_file.h"

namespace openscreen::cast {
namespace {

CastMessage;
_;
Invoke;
Mock;
Ne;
NiceMock;
NotNull;
Sequence;
StrEq;
StrictMock;

// Returns the location of certificate and auth challenge data files for cast
// receiver tests.
std::string GetTestDataSubdir() {}

class TestCredentialsProvider final
    : public DeviceAuthNamespaceHandler::CredentialsProvider {};

CastMessage TestAuthChallengeMessage() {}

class FakeApplication : public ApplicationAgent::Application,
                        public MessagePort::Client {};

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

TEST_F(ApplicationAgentTest, JustConnectsWithoutDoingAnything) {}

TEST_F(ApplicationAgentTest, IgnoresGarbageMessages) {}

TEST_F(ApplicationAgentTest, HandlesInvalidCommands) {}

TEST_F(ApplicationAgentTest, HandlesPings) {}

TEST_F(ApplicationAgentTest, HandlesGetAppAvailability) {}

TEST_F(ApplicationAgentTest, HandlesGetStatus) {}

TEST_F(ApplicationAgentTest, FailsLaunchRequestWithBadAppID) {}

TEST_F(ApplicationAgentTest, LaunchesApp_PassesMessages_ThenStopsApp) {}

TEST_F(ApplicationAgentTest, AllowsVirtualConnectionsToApp) {}

}  // namespace
}  // namespace openscreen::cast