#include "cast/streaming/public/session_messenger.h"
#include <memory>
#include "cast/streaming/testing/message_pipe.h"
#include "cast/streaming/testing/simple_message_port.h"
#include "gtest/gtest.h"
#include "platform/test/fake_clock.h"
#include "platform/test/fake_task_runner.h"
namespace openscreen::cast {
ElementsAre;
namespace {
constexpr char kSenderId[] = …;
constexpr char kReceiverId[] = …;
Offer kExampleOffer{ … };
struct SessionMessageStore { … };
}
class SessionMessengerTest : public ::testing::Test { … };
TEST_F(SessionMessengerTest, RpcMessaging) { … }
TEST_F(SessionMessengerTest, CapabilitiesMessaging) { … }
TEST_F(SessionMessengerTest, OfferAnswerMessaging) { … }
TEST_F(SessionMessengerTest, OfferAndReceiverError) { … }
TEST_F(SessionMessengerTest, UnknownSenderMessageTypesDontGetSent) { … }
TEST_F(SessionMessengerTest, UnknownReceiverMessageTypesDontGetSent) { … }
TEST_F(SessionMessengerTest, ReceiverHandlesUnknownMessageType) { … }
TEST_F(SessionMessengerTest, SenderHandlesUnknownMessageType) { … }
TEST_F(SessionMessengerTest, SenderHandlesMessageMissingSequenceNumber) { … }
TEST_F(SessionMessengerTest, ReceiverCannotSendToEmptyId) { … }
TEST_F(SessionMessengerTest, ErrorMessageLoggedIfTimeout) { … }
TEST_F(SessionMessengerTest, SenderHandlesTimeoutThatCausesDelete) { … }
TEST_F(SessionMessengerTest, SenderHandlesMessageThatCausesDelete) { … }
TEST_F(SessionMessengerTest, RecieverHandlesMessageThatCausesDelete) { … }
TEST_F(SessionMessengerTest, ReceiverHandlesMessagesFromMultipleSenders) { … }
TEST_F(SessionMessengerTest, SenderRejectsMessageFromWrongReceiver) { … }
TEST_F(SessionMessengerTest, ReceiverRejectsMessagesWithoutHandler) { … }
TEST_F(SessionMessengerTest, SenderRejectsMessagesWithoutHandler) { … }
TEST_F(SessionMessengerTest, UnknownNamespaceMessagesGetDropped) { … }
}