3 #include <gtest/gtest.h> 4 #include <gmock/gmock.h> 6 #include "../../../../LIBRARIES/UTILS/src/dpyError.h" 8 #include "../src/smsServer.h" 9 #include "../../api/src/smsClient.h" 17 MockSmsServer(boost::asio::io_service& io,
int rport,
int pport):
SmsServer(io, rport, pport) {
20 MOCK_METHOD3(sendSmsSourcesResponse,
void(
const std::string &,
const std::string &,
int));
21 MOCK_METHOD3(sendSmsSourceStatusResponse,
void(
const std::string &,
const std::string &,
int));
23 MOCK_METHOD3(sendAllSmsResponse,
void(
const std::string &,
const std::string &,
int));
24 MOCK_METHOD3(sendSmsInfoResponse,
void(
const std::string &,
const std::string &,
int));
25 MOCK_METHOD3(sendSmsDispatchResponse,
void(
const std::string &,
const std::string &,
int));
38 static boost::system::error_code lastErrorCode;
41 FakeClient(std::string& ip,
int dport,
int sport) :
48 boost::system::error_code FakeClient::lastErrorCode = DPY_NOT_IMPLEMENTED;
51 void sms_sources_handler(boost::system::error_code , __attribute__((unused)) std::list<std::string> sources){
52 FakeClient::lastErrorCode = DPY_OK;
55 void sms_source_event_handler(boost::system::error_code, __attribute__((unused)) std::string smssourceid,
dpySms::SourceStatus event){
56 FakeClient::lastErrorCode = DPY_OK;
57 FakeClient::smsSourceStatus = event;
60 void get_sms_list_handler(boost::system::error_code, __attribute__((unused))std::map<std::string, dpySms::SmsInformation> &smsList)
62 FakeClient::lastErrorCode = DPY_OK;
66 void get_sms_info_handler(boost::system::error_code, __attribute__((unused))
const std::string& smsid, __attribute__((unused))
const dpySms::SmsInformation &sms_info)
68 FakeClient::lastErrorCode = DPY_OK;
71 void send_sms_handler(boost::system::error_code, __attribute__((unused))
const std::string& smsid){
73 FakeClient::lastErrorCode = DPY_OK;
SourceStatus
Source Status.
Definition: iVoiceCallSource.h:18
Manages router and publisher.
Definition: smsServer.h:18
Allows to interact with the SMS service.
Definition: smsClient.h:13
ENABLED.
Definition: geofencingApi.h:62