diff options
Diffstat (limited to 'src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc')
-rw-r--r-- | src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc b/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc index cf1d107ba2..9d88178598 100644 --- a/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc +++ b/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc @@ -39,8 +39,8 @@ namespace test { namespace components { -namespace SmartObjects { -namespace SchemaItem { +namespace smart_object_test { + using namespace NsSmartDeviceLink::NsSmartObjects; /** @@ -52,43 +52,44 @@ TEST(test_AlwaysFalseSchemaItemTest, simple_test) { ISchemaItemPtr item = CAlwaysFalseSchemaItem::create(); obj = 5; - int resultType = item->validate(obj); + rpc::ValidationReport report("RPC"); + int resultType = item->validate(obj, &report); EXPECT_EQ(Errors::ERROR, resultType); EXPECT_EQ(5, obj.asInt()); obj = true; - resultType = item->validate(obj); + resultType = item->validate(obj, &report); EXPECT_EQ(Errors::ERROR, resultType); EXPECT_TRUE(obj.asBool()); obj = "Test"; - resultType = item->validate(obj); + resultType = item->validate(obj, &report); EXPECT_EQ(Errors::ERROR, resultType); EXPECT_EQ(std::string("Test"), obj.asString()); obj["First"] = "Some string"; obj["Second"] = 555; - resultType = item->validate(obj["First"]); + resultType = item->validate(obj["First"], &report); EXPECT_EQ(Errors::ERROR, resultType); - resultType = item->validate(obj["Second"]); + resultType = item->validate(obj["Second"], &report); EXPECT_EQ(Errors::ERROR, resultType); - resultType = item->validate(obj); + resultType = item->validate(obj, &report); EXPECT_EQ(Errors::ERROR, resultType); EXPECT_EQ(std::string("Some string"), obj["First"].asString()); EXPECT_EQ(555, obj["Second"].asInt()); obj[0] = true; obj[1] = false; - resultType = item->validate(obj[0]); + resultType = item->validate(obj[0], &report); EXPECT_EQ(Errors::ERROR, resultType); - resultType = item->validate(obj[1]); + resultType = item->validate(obj[1], &report); EXPECT_EQ(Errors::ERROR, resultType); - resultType = item->validate(obj); + resultType = item->validate(obj, &report); EXPECT_EQ(Errors::ERROR, resultType); EXPECT_TRUE(obj[0].asBool()); EXPECT_FALSE(obj[1].asBool()); } -} // namespace SchemaItem -} // namespace SmartObjects + +} // namespace smart_object_test } // namespace components } // namespace test |