Exemple #1
0
TEST(UriTest, UriConstructor) {
    auto uri_str = std::string("http://localhost:8888/redfish/v1");

    URI uri = URI(uri_str);

    EXPECT_EQ(uri_str, uri.to_string());
}
Exemple #2
0
TEST(UriTest, ReplaceHostUriPart) {
    auto uri_str = std::string("http://localhost:8888/redfish/v1");

    URI uri = URI(uri_str);
    uri.set_host("192.168.0.1");
    EXPECT_EQ("http://192.168.0.1:8888/redfish/v1", uri.to_string());
}
Exemple #3
0
bool operator < (const URI& lhs, const URI& rhs) noexcept {
  return lhs.to_string() < rhs.to_string();
}