std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK, OCPlatform::findResource("", requestURI.str(),
- OC_WIFI, &foundResource));
+ OC_IPV4, &foundResource));
}
TEST(FindResourceTest, FindResourceNullResourceURI)
{
EXPECT_ANY_THROW(OCPlatform::findResource("", nullptr,
- OC_WIFI, &foundResource));
+ OC_IPV4, &foundResource));
}
TEST(FindResourceTest, FindResourceNullResourceURI1)
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_ANY_THROW(OCPlatform::findResource(nullptr, requestURI.str(),
- OC_WIFI, &foundResource));
+ OC_IPV4, &foundResource));
}
TEST(FindResourceTest, FindResourceNullHost)
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_ANY_THROW(OCPlatform::findResource(nullptr, requestURI.str(),
- OC_WIFI, &foundResource));
+ OC_IPV4, &foundResource));
}
TEST(FindResourceTest, FindResourceNullresourceHandler)
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_THROW(OCPlatform::findResource("", requestURI.str(),
- OC_WIFI, NULL), OC::OCException);
+ OC_IPV4, NULL), OC::OCException);
}
TEST(FindResourceTest, DISABLED_FindResourceWithLowQoS)
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::findResource("", requestURI.str(), OC_WIFI, &foundResource,
+ OCPlatform::findResource("", requestURI.str(), OC_IPV4, &foundResource,
OC::QualityOfService::LowQos));
}
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::findResource("", requestURI.str(), OC_WIFI, &foundResource,
+ OCPlatform::findResource("", requestURI.str(), OC_IPV4, &foundResource,
OC::QualityOfService::MidQos));
}
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::findResource("", requestURI.str(), OC_WIFI, &foundResource,
+ OCPlatform::findResource("", requestURI.str(), OC_IPV4, &foundResource,
OC::QualityOfService::HighQos));
}
std::ostringstream requestURI;
requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::findResource("", requestURI.str(), OC_WIFI, &foundResource,
+ OCPlatform::findResource("", requestURI.str(), OC_IPV4, &foundResource,
OC::QualityOfService::NaQos));
}
std::ostringstream requestURI;
requestURI << OC_MULTICAST_PREFIX << deviceDiscoveryURI;
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::getDeviceInfo("", requestURI.str(), OC_WIFI, &receivedDeviceInfo));
+ OCPlatform::getDeviceInfo("", requestURI.str(), OC_IPV4, &receivedDeviceInfo));
}
TEST(GetDeviceInfoTest, GetDeviceInfoNullDeviceURI)
PlatformConfig cfg;
OCPlatform::Configure(cfg);
EXPECT_ANY_THROW(
- OCPlatform::getDeviceInfo("", nullptr, OC_WIFI, &receivedDeviceInfo));
+ OCPlatform::getDeviceInfo("", nullptr, OC_IPV4, &receivedDeviceInfo));
}
TEST(GetDeviceInfoTest, GetDeviceInfoWithNullDeviceInfoHandler)
std::ostringstream requestURI;
requestURI << OC_MULTICAST_PREFIX << deviceDiscoveryURI;
EXPECT_THROW(
- OCPlatform::getDeviceInfo("", requestURI.str(), OC_WIFI, NULL),
+ OCPlatform::getDeviceInfo("", requestURI.str(), OC_IPV4, NULL),
OC::OCException);
}
std::ostringstream requestURI;
requestURI << OC_MULTICAST_PREFIX << deviceDiscoveryURI;
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::getDeviceInfo("", requestURI.str(), OC_WIFI, &receivedDeviceInfo,
+ OCPlatform::getDeviceInfo("", requestURI.str(), OC_IPV4, &receivedDeviceInfo,
OC::QualityOfService::LowQos));
}
std::ostringstream requestURI;
requestURI << OC_MULTICAST_PREFIX << deviceDiscoveryURI;
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::getDeviceInfo("", requestURI.str(), OC_WIFI, &receivedDeviceInfo,
+ OCPlatform::getDeviceInfo("", requestURI.str(), OC_IPV4, &receivedDeviceInfo,
OC::QualityOfService::MidQos));
}
std::ostringstream requestURI;
requestURI << OC_MULTICAST_PREFIX << deviceDiscoveryURI;
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::getDeviceInfo("", requestURI.str(), OC_WIFI, &receivedDeviceInfo,
+ OCPlatform::getDeviceInfo("", requestURI.str(), OC_IPV4, &receivedDeviceInfo,
OC::QualityOfService::HighQos));
}
std::ostringstream requestURI;
requestURI << OC_MULTICAST_PREFIX << deviceDiscoveryURI;
EXPECT_EQ(OC_STACK_OK,
- OCPlatform::getDeviceInfo("", requestURI.str(), OC_WIFI, &receivedDeviceInfo,
+ OCPlatform::getDeviceInfo("", requestURI.str(), OC_IPV4, &receivedDeviceInfo,
OC::QualityOfService::NaQos));
}
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_EQ(OC_STACK_OK, OCPlatform::subscribePresence(presenceHandle, hostAddress,
- OC_WIFI, &presenceHandler));
+ OC_IPV4, &presenceHandler));
}
TEST(SubscribePresenceTest, SubscribePresenceWithNullHost)
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_ANY_THROW(OCPlatform::subscribePresence(presenceHandle, nullptr,
- OC_WIFI, &presenceHandler));
+ OC_IPV4, &presenceHandler));
}
TEST(SubscribePresenceTest, SubscribePresenceWithNullPresenceHandler)
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_ANY_THROW(OCPlatform::subscribePresence(presenceHandle, nullptr,
- OC_WIFI, NULL));
+ OC_IPV4, NULL));
}
TEST(SubscribePresenceTest, DISABLED_SubscribePresenceWithResourceType)
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_EQ(OC_STACK_OK, OCPlatform::subscribePresence(presenceHandle,
- OC_MULTICAST_IP, "core.light", OC_WIFI, &presenceHandler));
+ OC_MULTICAST_IP, "core.light", OC_IPV4, &presenceHandler));
}
TEST(SubscribePresenceTest, SubscribePresenceWithNullResourceType)
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_ANY_THROW(OCPlatform::subscribePresence(presenceHandle,
- OC_MULTICAST_IP, nullptr, OC_WIFI, &presenceHandler));
+ OC_MULTICAST_IP, nullptr, OC_IPV4, &presenceHandler));
}
TEST(SubscribePresenceTest, DISABLED_UnsubscribePresenceWithValidHandleAndRT)
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_EQ(OC_STACK_OK, OCPlatform::subscribePresence(presenceHandle,
- OC_MULTICAST_IP, "core.light", OC_WIFI, &presenceHandler));
+ OC_MULTICAST_IP, "core.light", OC_IPV4, &presenceHandler));
EXPECT_EQ(OC_STACK_OK, OCPlatform::unsubscribePresence(presenceHandle));
}
OCPlatform::OCPresenceHandle presenceHandle = nullptr;
EXPECT_EQ(OC_STACK_OK, OCPlatform::subscribePresence(presenceHandle,
- OC_MULTICAST_IP, OC_WIFI, &presenceHandler));
+ OC_MULTICAST_IP, OC_IPV4, &presenceHandler));
EXPECT_EQ(OC_STACK_OK, OCPlatform::unsubscribePresence(presenceHandle));
}