*
* @throw ESBadRequestException is thrown if the parameters are invalid
*/
- RemoteEnrolleeResource(ProvConfig enrolleeNWProvInfo, WiFiOnboadingConnection onboardingconn);
+ RemoteEnrolleeResource(const ProvConfig &enrolleeNWProvInfo,
+ const WiFiOnboadingConnection &onboardingconn);
~RemoteEnrolleeResource() = default;
static const char ES_PROV_RES_URI[] = "/oic/prov";
static const char ES_PROV_RES_TYPE[] = "oic.r.prov";
- RemoteEnrolleeResource::RemoteEnrolleeResource(ProvConfig provConfig,
- WiFiOnboadingConnection onboardingconn)
+ RemoteEnrolleeResource::RemoteEnrolleeResource(const ProvConfig &provConfig,
+ const WiFiOnboadingConnection &onboardingconn)
{
m_ProvConfig = provConfig;
m_wifiOnboardingconn = onboardingconn;
TEST_F(MediatorRichTest, testCreateEnrolleeDeviceNegative)
{
RemoteEnrollee::shared_ptr remoteEnrollee = NULL;
- ProvConfig netInfo ;
+ ProvConfig netInfo;
WiFiOnboadingConnection onboardingConn;
EasySetup *easysetupInstance = EasySetup::getInstance();
+ netInfo.connType = CT_ADAPTER_IP;
+
+ OICStrcpy(netInfo.provData.WIFI.ssid, NET_WIFI_SSID_SIZE - 1, ssid.c_str());
+ OICStrcpy(netInfo.provData.WIFI.pwd, NET_WIFI_PWD_SIZE - 1, pwd.c_str());
+
+ onboardingConn.isSecured = false;
+ OICStrcpy(onboardingConn.ipAddress, IPV4_ADDR_SIZE - 1, ipaddress.c_str());
+
//calling the createEnrolleeDevice
remoteEnrollee = easysetupInstance->createEnrolleeDevice(netInfo, onboardingConn);
//calling again the createEnrolleeDevice with same config & connection info [API throws the exception]