chromium/third_party/openscreen/src/cast/common/public/testing/discovery_utils.h

// 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.

#ifndef CAST_COMMON_PUBLIC_TESTING_DISCOVERY_UTILS_H_
#define CAST_COMMON_PUBLIC_TESTING_DISCOVERY_UTILS_H_

#include <string>

#include "cast/common/public/receiver_info.h"
#include "discovery/dnssd/public/dns_sd_txt_record.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "platform/base/ip_address.h"

namespace openscreen::cast {

// Constants used for testing.
extern const IPAddress kAddressV4;
extern const IPAddress kAddressV6;
constexpr uint16_t kPort =;
extern const IPEndpoint kEndpointV4;
extern const IPEndpoint kEndpointV6;
constexpr char kTestUniqueId[] =;
constexpr char kFriendlyName[] =;
constexpr char kModelName[] =;
constexpr char kInstanceId[] =;
constexpr uint8_t kTestVersion =;
constexpr char kCapabilitiesString[] =;
constexpr char kCapabilitiesStringLong[] =;
constexpr uint64_t kCapabilitiesParsed =;
constexpr uint8_t kStatus =;
constexpr ReceiverStatus kStatusParsed =;

discovery::DnsSdTxtRecord CreateValidTxt();

void CompareTxtString(const discovery::DnsSdTxtRecord& txt,
                      const std::string& key,
                      const std::string& expected);

void CompareTxtInt(const discovery::DnsSdTxtRecord& txt,
                   const std::string& key,
                   int expected);

}  // namespace openscreen::cast

#endif  // CAST_COMMON_PUBLIC_TESTING_DISCOVERY_UTILS_H_