summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/test/sql_pt_representation_test.cc
diff options
context:
space:
mode:
authorIvo Stoilov (GitHub) <istoilov@luxoft.com>2017-02-15 18:32:09 +0200
committerokozlovlux <okozlov@luxoft.com>2017-05-17 19:27:10 +0300
commitf175409c5e370b6c5c8b67ec72214990a9268673 (patch)
tree1735dbb7f2d84939bef562a09413c641a0c1ff27 /src/components/policy/policy_external/test/sql_pt_representation_test.cc
parent458fa67468b2c10a7f8eb18277a83eb90c2f8004 (diff)
downloadsdl_core-f175409c5e370b6c5c8b67ec72214990a9268673.tar.gz
Add new external UCS-related params in PTU, PreloadedPT, SnapshotPT
- added perstistence for external user consent status - fixed failed UTs
Diffstat (limited to 'src/components/policy/policy_external/test/sql_pt_representation_test.cc')
-rw-r--r--src/components/policy/policy_external/test/sql_pt_representation_test.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/policy/policy_external/test/sql_pt_representation_test.cc b/src/components/policy/policy_external/test/sql_pt_representation_test.cc
index 531b4e67b7..61c769bd61 100644
--- a/src/components/policy/policy_external/test/sql_pt_representation_test.cc
+++ b/src/components/policy/policy_external/test/sql_pt_representation_test.cc
@@ -62,10 +62,15 @@ using testing::ReturnRef;
using testing::Return;
using testing::NiceMock;
using testing::Mock;
+
namespace test {
namespace components {
namespace policy_test {
+namespace {
+const int32_t kPolicyTablesNumber = 27;
+}
+
class SQLPTRepresentationTest : public SQLPTRepresentation,
public ::testing::Test {
public:
@@ -224,6 +229,7 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
policy_table["app_policies"] = Json::Value(Json::objectValue);
Json::Value& module_config = policy_table["module_config"];
+ module_config["preloaded_date"] = Json::Value("25-04-2015");
module_config["exchange_after_x_ignition_cycles"] = Json::Value(10);
module_config["exchange_after_x_kilometers"] = Json::Value(100);
module_config["exchange_after_x_days"] = Json::Value(5);
@@ -400,7 +406,7 @@ TEST_F(SQLPTRepresentationTest,
// Check PT structure destroyed and tables number is 0
query.Prepare(query_select);
query.Next();
- ASSERT_EQ(25, query.GetInteger(0));
+ ASSERT_EQ(kPolicyTablesNumber, query.GetInteger(0));
const std::string query_select_count_of_iap_buffer_full =
"SELECT `count_of_iap_buffer_full` FROM `usage_and_error_count`";