#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"
#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;
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) { … }
}
}