Added a test case for ConstructResourceTest to simulate the
scenario of Resource creation with host not having port number.
Change-Id: Ia9ffa317956b8c73dca16a0701c9fd28c8cbaed1
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2115
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
EXPECT_ANY_THROW(ConstructResourceObject(std::string(""), std::string("")));
}
+ TEST(ConstructResourceTest, ConstructResourceObjectWithoutPortNumber)
+ {
+ EXPECT_ANY_THROW(ConstructResourceObject("coap://192.168.1.2", "/resource"));
+ }
+
TEST(ResourceGetTest, DISABLED_ResourceGetForValidUri)
{
OCResource::Ptr resource = ConstructResourceObject("coap://192.168.1.2:5000", "/resource");