#include "cast/streaming/public/answer_messages.h"
#include <chrono>
#include <string_view>
#include <utility>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "util/chrono_helpers.h"
#include "util/json/json_serialization.h"
namespace openscreen::cast {
namespace {
ElementsAre;
constexpr char kValidAnswerJson[] = …;
const Answer kValidAnswer{ … };
constexpr int kValidMaxPixelsPerSecond = …;
constexpr Dimensions kValidDimensions{ … };
static const VideoConstraints kValidVideoConstraints{ … };
constexpr AudioConstraints kValidAudioConstraints{ … };
void ExpectEqualsValidAnswerJson(const Answer& answer) { … }
void ExpectFailureOnParse(std::string_view raw_json) { … }
void ExpectSuccessOnParse(std::string_view raw_json, Answer* out = nullptr) { … }
}
TEST(AnswerMessagesTest, ProperlyPopulatedAnswerSerializesProperly) { … }
TEST(AnswerMessagesTest, EmptyArraysOmitted) { … }
TEST(AnswerMessagesTest, InvalidDimensionsCauseInvalid) { … }
TEST(AnswerMessagesTest, InvalidAudioConstraintsCauseError) { … }
TEST(AnswerMessagesTest, InvalidVideoConstraintsCauseError) { … }
TEST(AnswerMessagesTest, InvalidDisplayDescriptionsCauseError) { … }
TEST(AnswerMessagesTest, InvalidUdpPortsCauseError) { … }
TEST(AnswerMessagesTest, CanParseValidAnswerJson) { … }
TEST(AnswerMessagesTest, SucceedsWithMissingRtpFields) { … }
TEST(AnswerMessagesTest, ErrorOnEmptyAnswer) { … }
TEST(AnswerMessagesTest, ErrorOnMissingUdpPort) { … }
TEST(AnswerMessagesTest, ErrorOnMissingSsrcs) { … }
TEST(AnswerMessagesTest, ErrorOnMissingSendIndexes) { … }
TEST(AnswerMessagesTest, AllowsReceiverSideScaling) { … }
TEST(AnswerMessagesTest, AssumesMinBitRateIfOmitted) { … }
TEST(AnswerMessagesTest, AudioConstraintsIsValid) { … }
TEST(AnswerMessagesTest, DimensionsIsValid) { … }
TEST(AnswerMessagesTest, VideoConstraintsIsValid) { … }
TEST(AnswerMessagesTest, ConstraintsIsValid) { … }
TEST(AnswerMessagesTest, AspectRatioIsValid) { … }
TEST(AnswerMessagesTest, AspectRatioTryParse) { … }
TEST(AnswerMessagesTest, DisplayDescriptionTryParse) { … }
TEST(AnswerMessagesTest, DisplayDescriptionIsValid) { … }
}