Main Page
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Enumerations
Enumerator
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
w
~
+
Variables
a
b
c
d
e
f
h
i
l
m
n
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
+
Files
File List
+
File Members
All
Functions
Typedefs
Enumerations
Enumerator
Macros
tests
http_request.cpp
Go to the documentation of this file.
1
#include "pf_driver/http_helpers.hpp"
2
#include <gtest/gtest.h>
3
#include <iostream>
4
5
/*
6
// Declare a test
7
TEST(HHTPInterface_TestSuite, testURIBuilder)
8
{
9
HTTPInterface http_interface("10.0.10.7", "cmd");
10
11
const std::string err_code = "error_code";
12
const std::string err_text = "error_text";
13
const std::string err_http = "error_http";
14
std::vector<std::string> err = { err_code, err_text };
15
std::map<std::string, std::string> json_resp = http_interface.get(err, "get_protocol_info");
16
17
EXPECT_NE(json_resp[err_http], std::string("OK"));
18
}
19
*/
20
21
/*
22
TEST(HHTPInterface_TestSuite, testURIBuilder2)
23
{
24
HTTPInterface http_interface("10.0.10.76", "cmd");
25
26
const std::string err_code = "error_code";
27
const std::string err_text = "error_text";
28
const std::string err_http = "error_http";
29
std::vector<std::string> err = { err_code, err_text };
30
std::map<std::string, std::string> json_resp = http_interface.get(err, "get_protocol_info");
31
32
EXPECT_EQ(json_resp[err_http], std::string("OK"));
33
EXPECT_EQ(json_resp[err_code], std::string("0"));
34
EXPECT_EQ(json_resp[err_text], std::string("success"));
35
}
36
*/
pf_driver
Author(s): Harsh Deshpande
autogenerated on Fri Feb 24 2023 03:59:35