Added a test case for ConstructResourceTest to simulate the scenario
of Resource creation with no "coap" scheme in the the host value
Change-Id: Iaec6f6f0038a049b969d08685cc057e6bae80455
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2517
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
EXPECT_ANY_THROW(ConstructResourceObject(std::string(""), std::string("")));
}
+ TEST(ConstructResourceTest, ConstructResourceObjectWithoutCoapScheme)
+ {
+ EXPECT_ANY_THROW(ConstructResourceObject("//192.168.1.2:5000", "/resource"));
+ }
+
TEST(ConstructResourceTest, ConstructResourceObjectWithoutPortNumber)
{
EXPECT_ANY_THROW(ConstructResourceObject("coap://192.168.1.2", "/resource"));