summaryrefslogtreecommitdiff
path: root/src/components/policy/test/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/test/include')
-rw-r--r--src/components/policy/test/include/driver_dbms.h159
-rw-r--r--src/components/policy/test/include/mock_app_stopwatch.h54
-rw-r--r--src/components/policy/test/include/mock_cache_manager.h207
-rw-r--r--src/components/policy/test/include/mock_policy_listener.h81
-rw-r--r--src/components/policy/test/include/mock_policy_manager.h179
-rw-r--r--src/components/policy/test/include/mock_pt_ext_representation.h139
-rw-r--r--src/components/policy/test/include/mock_pt_representation.h105
-rw-r--r--src/components/policy/test/include/mock_update_status_manager.h57
8 files changed, 0 insertions, 981 deletions
diff --git a/src/components/policy/test/include/driver_dbms.h b/src/components/policy/test/include/driver_dbms.h
deleted file mode 100644
index edd183dbd4..0000000000
--- a/src/components/policy/test/include/driver_dbms.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_POLICY_TEST_INCLUDE_DRIVER_DBMS_H_
-#define SRC_COMPONENTS_POLICY_TEST_INCLUDE_DRIVER_DBMS_H_
-
-#ifdef __QNX__
-#include <qdb/qdb.h>
-#else // __QNX__
-#include <sqlite3.h>
-#endif // __QNX__
-
-namespace test {
-namespace components {
-namespace policy {
-
-#ifdef __QNX__
-class DBMS {
- public:
- explicit DBMS(std::string db_name) : db_name_(db_name), conn_(0) {}
- ~DBMS() {
- Close();
- }
- bool Open() {
- conn_ = qdb_connect(db_name_.c_str(), 0);
- return conn_ != NULL;
- }
- void Close() {
- qdb_disconnect(conn_);
- }
- bool Exec(const char* query) {
- return -1 != qdb_statement(conn_, query);
- }
- int FetchOneInt(const char* query) {
- int stmt = qdb_stmt_init(conn_, query, strlen(query) + 1);
- qdb_stmt_exec(conn_, stmt, NULL, 0);
- qdb_result_t* res = qdb_getresult(conn_);
- void* ret = qdb_cell(res, 0, 0);
- int value = 0;
- if (ret) {
- value = *static_cast<int*>(ret);
- }
- qdb_stmt_free(conn_, stmt);
- return value;
- }
- double FetchOneDouble(const char* query) {
- int stmt = qdb_stmt_init(conn_, query, strlen(query) + 1);
- qdb_stmt_exec(conn_, stmt, NULL, 0);
- qdb_result_t* res = qdb_getresult(conn_);
- void* ret = qdb_cell(res, 0, 0);
- double value = 0.0;
- if (ret) {
- value = *static_cast<double*>(ret);
- }
- qdb_stmt_free(conn_, stmt);
-
- return value;
- }
- std::string FetchOneString(const char* query) {
- int stmt = qdb_stmt_init(conn_, query, strlen(query) + 1);
- qdb_stmt_exec(conn_, stmt, NULL, 0);
- qdb_result_t* res = qdb_getresult(conn_);
- void* ret = qdb_cell(res, 0, 0);
- std::string value = "";
- if (ret) {
- value = std::string(static_cast<const char*>(ret));
- }
- qdb_stmt_free(conn_, stmt);
-
- return value;
- }
-
- private:
- std::string db_name_;
- qdb_hdl_t* conn_;
-};
-
-#else // __QNX__
-class DBMS {
- public:
- explicit DBMS(std::string file_name) : file_name_(file_name), conn_(0) {}
- ~DBMS() {
- Close();
- }
- bool Open() {
- return SQLITE_OK == sqlite3_open(file_name_.c_str(), &conn_);
- }
- void Close() {
- sqlite3_close(conn_);
- remove(file_name_.c_str());
- }
- bool Exec(const char* query) {
- return SQLITE_OK == sqlite3_exec(conn_, query, NULL, NULL, NULL);
- }
- int FetchOneInt(const char* query) {
- sqlite3_stmt* statement;
- sqlite3_prepare(conn_, query, -1, &statement, NULL);
- sqlite3_step(statement);
- int value = sqlite3_column_int(statement, 0);
- sqlite3_finalize(statement);
- return value;
- }
- double FethcOneDouble(const char* query) {
- sqlite3_stmt* statement;
- sqlite3_prepare(conn_, query, -1, &statement, NULL);
- sqlite3_step(statement);
- double value = sqlite3_column_double(statement, 0);
- sqlite3_finalize(statement);
- return value;
- }
- std::string FetchOneString(const char* query) {
- sqlite3_stmt* statement;
- sqlite3_prepare(conn_, query, -1, &statement, NULL);
- sqlite3_step(statement);
- const unsigned char* txt = sqlite3_column_text(statement, 0);
- std::string value = std::string(reinterpret_cast<const char*>(txt));
- sqlite3_finalize(statement);
- return value;
- }
-
- private:
- std::string file_name_;
- sqlite3* conn_;
-};
-#endif // __QNX__
-
-} // namespace policy
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_POLICY_TEST_INCLUDE_DRIVER_DBMS_H_
diff --git a/src/components/policy/test/include/mock_app_stopwatch.h b/src/components/policy/test/include/mock_app_stopwatch.h
deleted file mode 100644
index 481d887cb2..0000000000
--- a/src/components/policy/test/include/mock_app_stopwatch.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_INCLUDE_TEST_POLICY_USAGE_STATISTICS_MOCK_APP_STOPWATCH_H_
-#define SRC_COMPONENTS_INCLUDE_TEST_POLICY_USAGE_STATISTICS_MOCK_APP_STOPWATCH_H_
-
-#include "gmock/gmock.h"
-#include "policy/usage_statistics/app_stopwatch.h"
-#include "policy/usage_statistics/statistics_manager.h"
-
-namespace test {
-namespace components {
-namespace usage_statistics_test {
-
-class MockAppStopwatch : public usage_statistics::AppStopwatch {
- public:
- MOCK_METHOD1(Start, void(usage_statistics::AppStopwatchId stopwatch_type));
- MOCK_METHOD1(Switch, void(usage_statistics::AppStopwatchId stopwatch_type));
- MOCK_METHOD0(WriteTime, void());
-};
-
-} // namespace usage_statistics_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_INCLUDE_TEST_POLICY_USAGE_STATISTICS_MOCK_APP_STOPWATCH_H_
diff --git a/src/components/policy/test/include/mock_cache_manager.h b/src/components/policy/test/include/mock_cache_manager.h
deleted file mode 100644
index 095319a090..0000000000
--- a/src/components/policy/test/include/mock_cache_manager.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_CACHE_MANAGER_H_
-#define SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_CACHE_MANAGER_H_
-
-#include <string>
-#include <vector>
-
-#include "gmock/gmock.h"
-
-#include "policy/cache_manager_interface.h"
-
-namespace policy_table = rpc::policy_table_interface_base;
-
-namespace policy {
-
-class MockCacheManagerInterface : public CacheManagerInterface {
- public:
- MOCK_METHOD4(CheckPermissions,
- void(const PTString& app_id,
- const PTString& hmi_level,
- const PTString& rpc,
- CheckPermissionResult& result));
- MOCK_METHOD0(IsPTPreloaded, bool());
- MOCK_METHOD0(IgnitionCyclesBeforeExchange, int());
- MOCK_METHOD1(KilometersBeforeExchange, int(int current));
- MOCK_METHOD2(SetCountersPassedForSuccessfulUpdate,
- bool(Counters counter, int value));
- MOCK_METHOD1(DaysBeforeExchange, int(int current));
- MOCK_METHOD0(IncrementIgnitionCycles, void());
- MOCK_METHOD0(ResetIgnitionCycles, void());
- MOCK_METHOD0(TimeoutResponse, int());
- MOCK_METHOD1(SecondsBetweenRetries, bool(std::vector<int>& seconds));
- MOCK_CONST_METHOD0(GetVehicleInfo, const VehicleInfo());
- MOCK_METHOD1(SetVINValue, bool(const std::string& value));
- MOCK_METHOD2(GetUserFriendlyMsg,
- std::vector<UserFriendlyMessage>(
- const std::vector<std::string>& msg_codes,
- const std::string& language));
- MOCK_METHOD2(GetUpdateUrls, void(int service_type, EndpointUrls& end_points));
- MOCK_METHOD1(
- GetNotificationsNumber,
- policy_table::NumberOfNotificationsType(const std::string& priority));
- MOCK_CONST_METHOD2(GetPriority,
- bool(const std::string& policy_app_id,
- std::string& priority));
- MOCK_METHOD2(GetServiceUrls,
- void(const std::string& service_type, EndpointUrls& end_points));
- MOCK_CONST_METHOD0(GetLockScreenIconUrl, std::string());
- MOCK_METHOD2(Init,
- bool(const std::string& file_name,
- const PolicySettings* settings));
- MOCK_METHOD0(GenerateSnapshot, utils::SharedPtr<policy_table::Table>());
- MOCK_METHOD1(ApplyUpdate, bool(const policy_table::Table& update_pt));
- MOCK_METHOD1(Save, bool(const policy_table::Table& table));
- MOCK_CONST_METHOD0(UpdateRequired, bool());
- MOCK_METHOD1(SaveUpdateRequired, void(bool status));
- MOCK_METHOD3(GetInitialAppData,
- bool(const std::string& app_id,
- StringArray& nicknames,
- StringArray& app_hmi_types));
- MOCK_CONST_METHOD1(IsApplicationRevoked, bool(const std::string& app_id));
- MOCK_METHOD1(GetFunctionalGroupings,
- bool(policy_table::FunctionalGroupings& groups));
- MOCK_CONST_METHOD1(IsApplicationRepresented, bool(const std::string& app_id));
- MOCK_METHOD1(IsDefaultPolicy, bool(const std::string& app_id));
- MOCK_METHOD1(SetIsDefault, bool(const std::string& app_id));
- MOCK_METHOD1(IsPredataPolicy, bool(const std::string& app_id));
- MOCK_METHOD1(SetDefaultPolicy, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
- MOCK_CONST_METHOD2(GetDefaultHMI,
- bool(const std::string& app_id, std::string& default_hmi));
- MOCK_METHOD0(ResetUserConsent, bool());
- MOCK_CONST_METHOD3(GetUserPermissionsForDevice,
- bool(const std::string& device_id,
- StringArray& consented_groups,
- StringArray& disallowed_groups));
- MOCK_METHOD3(GetPermissionsForApp,
- bool(const std::string& device_id,
- const std::string& app_id,
- FunctionalIdType& group_types));
- MOCK_CONST_METHOD2(
- GetDeviceGroupsFromPolicies,
- bool(rpc::policy_table_interface_base::Strings& groups,
- rpc::policy_table_interface_base::Strings& preconsented_groups));
- MOCK_METHOD2(AddDevice,
- bool(const std::string& device_id,
- const std::string& connection_type));
- MOCK_METHOD8(SetDeviceData,
- bool(const std::string& device_id,
- const std::string& hardware,
- const std::string& firmware,
- const std::string& os,
- const std::string& os_version,
- const std::string& carrier,
- const uint32_t number_of_ports,
- const std::string& connection_type));
- MOCK_METHOD3(SetUserPermissionsForDevice,
- bool(const std::string& device_id,
- const StringArray& consented_groups,
- const StringArray& disallowed_groups));
- MOCK_METHOD2(ReactOnUserDevConsentForApp,
- bool(const std::string& app_id, bool is_device_allowed));
- MOCK_METHOD1(SetUserPermissionsForApp,
- bool(const PermissionConsent& permissions));
- MOCK_METHOD3(SetMetaInfo,
- bool(const std::string& ccpu_version,
- const std::string& wers_country_code,
- const std::string& language));
- MOCK_CONST_METHOD0(IsMetaInfoPresent, bool());
- MOCK_METHOD1(SetSystemLanguage, bool(const std::string& language));
- MOCK_METHOD1(Increment, void(usage_statistics::GlobalCounterId type));
- MOCK_METHOD2(Increment,
- void(const std::string& app_id,
- usage_statistics::AppCounterId type));
- MOCK_METHOD3(Set,
- void(const std::string& app_id,
- usage_statistics::AppInfoId type,
- const std::string& value));
- MOCK_METHOD3(Add,
- void(const std::string& app_id,
- usage_statistics::AppStopwatchId type,
- int seconds));
- MOCK_METHOD2(CountUnconsentedGroups,
- int(const std::string& policy_app_id,
- const std::string& device_id));
- MOCK_METHOD1(GetFunctionalGroupNames, bool(FunctionalGroupNames& names));
- MOCK_METHOD2(GetAllAppGroups,
- void(const std::string& app_id,
- FunctionalGroupIDs& all_group_ids));
- MOCK_METHOD2(GetPreConsentedGroups,
- void(const std::string& app_id,
- FunctionalGroupIDs& preconsented_groups));
- MOCK_METHOD4(GetConsentedGroups,
- void(const std::string& device_id,
- const std::string& app_id,
- FunctionalGroupIDs& allowed_groups,
- FunctionalGroupIDs& disallowed_groups));
- MOCK_METHOD3(GetUnconsentedGroups,
- void(const std::string& device_id,
- const std::string& policy_app_id,
- FunctionalGroupIDs& unconsented_groups));
- MOCK_METHOD2(RemoveAppConsentForGroup,
- void(const std::string& app_id, const std::string& group_name));
- MOCK_METHOD1(SetPredataPolicy, bool(const std::string& app_id));
- MOCK_METHOD0(CleanupUnpairedDevices, bool());
- MOCK_METHOD2(SetUnpairedDevice,
- bool(const std::string& device_id, bool unpaired));
- MOCK_METHOD1(UnpairedDevicesList, bool(DeviceIds& device_ids));
- MOCK_METHOD1(ResetPT, bool(const std::string& file_name));
- MOCK_METHOD0(LoadFromBackup, bool());
- MOCK_METHOD2(LoadFromFile,
- bool(const std::string& file_name, policy_table::Table&));
- MOCK_METHOD0(Backup, void());
- MOCK_CONST_METHOD1(HeartBeatTimeout, uint32_t(const std::string& app_id));
- MOCK_CONST_METHOD2(GetAppRequestTypes,
- void(const std::string& policy_app_id,
- std::vector<std::string>& request_types));
- MOCK_METHOD1(GetHMIAppTypeAfterUpdate,
- void(std::map<std::string, StringArray>& app_hmi_types));
- MOCK_METHOD0(ResetCalculatedPermissions, void());
- MOCK_METHOD3(AddCalculatedPermissions,
- void(const std::string& device_id,
- const std::string& policy_app_id,
- const policy::Permissions& permissions));
- MOCK_METHOD3(IsPermissionsCalculated,
- bool(const std::string& device_id,
- const std::string& policy_app_id,
- policy::Permissions& permission));
- MOCK_CONST_METHOD0(GetPT, utils::SharedPtr<policy_table::Table>());
- MOCK_CONST_METHOD0(GetCertificate, std::string());
- MOCK_METHOD1(SetDecryptedCertificate, void(const std::string&));
-};
-
-} // namespace policy
-
-#endif // SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_CACHE_MANAGER_H_
diff --git a/src/components/policy/test/include/mock_policy_listener.h b/src/components/policy/test/include/mock_policy_listener.h
deleted file mode 100644
index 73905f4dcb..0000000000
--- a/src/components/policy/test/include/mock_policy_listener.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_POLICY_LISTENER_H_
-#define SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_POLICY_LISTENER_H_
-
-#include <string>
-
-#include "gmock/gmock.h"
-
-#include "policy/policy_listener.h"
-#include "rpc_base/rpc_base.h"
-#include "policy/policy_table/types.h"
-#include "utils/custom_string.h"
-
-namespace policy_table = ::rpc::policy_table_interface_base;
-
-namespace policy {
-
-namespace custom_str = utils::custom_string;
-
-class MockPolicyListener : public PolicyListener {
- public:
- MOCK_METHOD3(OnPermissionsUpdated,
- void(const std::string& policy_app_id,
- const Permissions& permissions,
- const policy::HMILevel& default_hmi));
- MOCK_METHOD2(OnPermissionsUpdated,
- void(const std::string& policy_app_id,
- const Permissions& permissions));
- MOCK_METHOD1(OnPendingPermissionChange,
- void(const std::string& policy_app_id));
- MOCK_METHOD1(OnUpdateStatusChanged, void(const std::string& status));
- MOCK_METHOD1(OnCurrentDeviceIdUpdateRequired,
- std::string(const std::string& policy_app_id));
- MOCK_METHOD0(OnSystemInfoUpdateRequired, void());
- MOCK_METHOD1(GetAppName,
- custom_str::CustomString(const std::string& policy_app_id));
- MOCK_METHOD0(OnUserRequestedUpdateCheckRequired, void());
- MOCK_METHOD2(OnDeviceConsentChanged,
- void(const std::string& device_id, bool is_allowed));
- MOCK_METHOD1(OnUpdateHMIAppType, void(std::map<std::string, StringArray>));
- MOCK_METHOD1(GetAvailableApps, void(std::queue<std::string>&));
- MOCK_METHOD1(OnSnapshotCreated, void(const BinaryMessage& pt_string));
- MOCK_METHOD0(CanUpdate, bool());
- MOCK_METHOD1(OnCertificateUpdated, void(const std::string&));
- MOCK_CONST_METHOD2(SendOnAppPermissionsChanged,
- void(const AppPermissions&, const std::string&));
-};
-
-} // namespace policy
-
-#endif // SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_POLICY_LISTENER_H_
diff --git a/src/components/policy/test/include/mock_policy_manager.h b/src/components/policy/test/include/mock_policy_manager.h
deleted file mode 100644
index 579e15fcca..0000000000
--- a/src/components/policy/test/include/mock_policy_manager.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_POLICY_MANAGER_H_
-#define SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_POLICY_MANAGER_H_
-
-#include <string>
-#include <vector>
-#include "gmock/gmock.h"
-#include "policy/policy_listener.h"
-#include "policy/policy_types.h"
-#include "policy/usage_statistics/statistics_manager.h"
-
-#include "rpc_base/rpc_base.h"
-#include "policy/policy_table/types.h"
-#include "policy/policy_manager.h"
-
-namespace policy_table = ::rpc::policy_table_interface_base;
-
-namespace policy_manager {
-
-using namespace policy;
-
-class MockPolicyManager : public PolicyManager {
- public:
- MOCK_METHOD1(set_listener, void(PolicyListener* listener));
- MOCK_METHOD2(InitPT,
- bool(const std::string& file_name,
- const PolicySettings* settings));
- MOCK_METHOD2(LoadPT,
- bool(const std::string& file, const BinaryMessage& pt_content));
- MOCK_METHOD1(ResetPT, bool(const std::string& file_name));
- MOCK_CONST_METHOD1(GetUpdateUrl, std::string(int service_type));
- MOCK_METHOD2(GetUpdateUrls, void(int service_type, EndpointUrls& end_points));
- MOCK_METHOD0(RequestPTUpdate, bool());
- MOCK_METHOD5(CheckPermissions,
- void(const PTString& app_id,
- const PTString& hmi_level,
- const PTString& rpc,
- const RPCParams& rpc_params,
- CheckPermissionResult& result));
- MOCK_METHOD0(ResetUserConsent, bool());
- MOCK_CONST_METHOD0(GetPolicyTableStatus, std::string());
- MOCK_METHOD1(KmsChanged, void(int kilometers));
- MOCK_METHOD0(IncrementIgnitionCycles, void());
- MOCK_METHOD0(ForcePTExchange, std::string());
- MOCK_METHOD0(ResetRetrySequence, void());
- MOCK_METHOD0(NextRetryTimeout, int());
- MOCK_METHOD0(TimeoutExchange, int());
- MOCK_METHOD0(RetrySequenceDelaysSeconds, const std::vector<int>());
- MOCK_METHOD0(OnExceededTimeout, void());
- MOCK_METHOD0(OnUpdateStarted, void());
- MOCK_CONST_METHOD1(GetUserConsentForDevice,
- DeviceConsent(const std::string& device_id));
- MOCK_METHOD3(
- GetUserConsentForApp,
- void(const std::string& device_id,
- const std::string& policy_app_id,
- std::vector<policy::FunctionalGroupPermission>& permissions));
- MOCK_METHOD2(SetUserConsentForDevice,
- void(const std::string& device_id, bool is_allowed));
- MOCK_METHOD2(ReactOnUserDevConsentForApp,
- bool(const std::string app_id, bool is_device_allowed));
- MOCK_METHOD2(PTUpdatedAt, void(policy::Counters counter, int value));
-
- MOCK_METHOD3(GetInitialAppData,
- bool(const std::string&,
- policy::StringArray*,
- policy::StringArray*));
-
- MOCK_METHOD2(AddDevice,
- void(const std::string& device_id,
- const std::string& connection_type));
- MOCK_METHOD2(SetDeviceInfo,
- void(const std::string& device_id,
- const policy::DeviceInfo& device_info));
- MOCK_METHOD1(SetUserConsentForApp,
- void(const policy::PermissionConsent& permissions));
- MOCK_CONST_METHOD2(GetDefaultHmi,
- bool(const std::string& policy_app_id,
- std::string* default_hmi));
- MOCK_CONST_METHOD2(GetPriority,
- bool(const std::string& policy_app_id,
- std::string* priority));
- MOCK_METHOD2(GetUserFriendlyMessages,
- std::vector<policy::UserFriendlyMessage>(
- const std::vector<std::string>& message_code,
- const std::string& language));
- MOCK_CONST_METHOD1(IsApplicationRevoked, bool(const std::string& app_id));
- MOCK_METHOD3(
- GetPermissionsForApp,
- void(const std::string& device_id,
- const std::string& policy_app_id,
- std::vector<policy::FunctionalGroupPermission>& permissions));
- MOCK_METHOD1(GetAppPermissionsChanges,
- policy::AppPermissions(const std::string& policy_app_id));
- MOCK_METHOD1(RemovePendingPermissionChanges, void(const std::string& app_id));
- MOCK_CONST_METHOD1(GetCurrentDeviceId,
- std::string&(const std::string& policy_app_id));
- MOCK_METHOD1(SetSystemLanguage, void(const std::string& language));
- MOCK_METHOD3(SetSystemInfo,
- void(const std::string& ccpu_version,
- const std::string& wers_country_code,
- const std::string& language));
- MOCK_METHOD1(SendNotificationOnPermissionsUpdated,
- void(const std::string& application_id));
- MOCK_METHOD1(MarkUnpairedDevice, void(const std::string& device_id));
- MOCK_METHOD1(AddApplication, void(const std::string& application_id));
- MOCK_METHOD0(CleanupUnpairedDevices, bool());
- MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
- MOCK_METHOD0(OnSystemReady, void());
- MOCK_CONST_METHOD1(GetNotificationsNumber,
- uint32_t(const std::string& priority));
- MOCK_METHOD1(SetVINValue, void(const std::string& value));
- MOCK_METHOD1(IsPredataPolicy, bool(const std::string& policy_app_id));
- MOCK_CONST_METHOD1(HeartBeatTimeout, uint32_t(const std::string& app_id));
- MOCK_METHOD1(SaveUpdateStatusRequired, void(bool is_update_needed));
- MOCK_METHOD0(OnAppsSearchStarted, void());
- MOCK_METHOD0(OnAppsSearchCompleted, void());
- MOCK_METHOD1(OnAppRegisteredOnMobile,
- void(const std::string& application_id));
- MOCK_CONST_METHOD1(
- GetAppRequestTypes,
- const std::vector<std::string>(const std::string policy_app_id));
- MOCK_CONST_METHOD0(GetVehicleInfo, const policy::VehicleInfo());
- MOCK_CONST_METHOD0(RetrieveCertificate, std::string());
- MOCK_METHOD1(SetDecryptedCertificate, void(const std::string&));
- MOCK_METHOD0(ExceededIgnitionCycles, bool());
- MOCK_METHOD0(ExceededDays, bool());
- MOCK_METHOD0(StartPTExchange, void());
- MOCK_METHOD1(Increment, void(usage_statistics::GlobalCounterId type));
- MOCK_METHOD2(Increment,
- void(const std::string& app_id,
- usage_statistics::AppCounterId type));
- MOCK_METHOD3(Set,
- void(const std::string& app_id,
- usage_statistics::AppInfoId type,
- const std::string& value));
- MOCK_METHOD3(Add,
- void(const std::string& app_id,
- usage_statistics::AppStopwatchId type,
- int32_t timespan_seconds));
- MOCK_CONST_METHOD0(get_settings, const PolicySettings&());
- MOCK_METHOD1(set_settings, void(const PolicySettings* get_settings));
-};
-
-} // namespace policy_manager
-
-#endif // SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_POLICY_MANAGER_H_
diff --git a/src/components/policy/test/include/mock_pt_ext_representation.h b/src/components/policy/test/include/mock_pt_ext_representation.h
deleted file mode 100644
index 4f6eb7e08f..0000000000
--- a/src/components/policy/test/include/mock_pt_ext_representation.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_PT_EXT_REPRESENTATION_H_
-#define SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_PT_EXT_REPRESENTATION_H_
-
-#include <string>
-#include <vector>
-
-#include "gmock/gmock.h"
-
-#include "policy/pt_ext_representation.h"
-#include "rpc_base/rpc_base.h"
-#include "policy/policy_table/types.h"
-#include "mock_pt_representation.h"
-
-namespace policy_table = ::rpc::policy_table_interface_base;
-
-namespace policy {
-class MockPTExtRepresentation : public MockPTRepresentation,
- public PTExtRepresentation {
- public:
- MOCK_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
- MOCK_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
- MOCK_METHOD2(GetDefaultHMI,
- bool(const std::string& app_id, std::string* default_hmi));
- MOCK_METHOD0(ResetUserConsent, bool());
- MOCK_METHOD0(ResetDeviceConsents, bool());
- MOCK_METHOD0(ResetAppConsents, bool());
- MOCK_METHOD3(GetUserPermissionsForDevice,
- bool(const std::string&, StringArray*, StringArray*));
- MOCK_METHOD3(GetPermissionsForApp,
- bool(const std::string&,
- const std::string&,
- FunctionalIdType* group_types));
- MOCK_METHOD2(GetDeviceGroupsFromPolicies,
- bool(policy_table::Strings*, policy_table::Strings*));
- MOCK_METHOD2(
- GetUserFriendlyMsg,
- std::vector<UserFriendlyMessage>(const std::vector<std::string>& msg_code,
- const std::string& language));
- MOCK_METHOD8(SetDeviceData,
- bool(const std::string& device_id,
- const std::string& hardware,
- const std::string& firmware,
- const std::string& os,
- const std::string& os_version,
- const std::string& carrier,
- const uint32_t number_of_ports,
- const std::string& connection_type));
- MOCK_METHOD6(SetDeviceData,
- bool(const std::string&,
- const std::string&,
- const std::string&,
- const std::string&,
- const std::string&,
- const std::string&));
- MOCK_METHOD2(SetMaxNumberPorts,
- bool(const std::string& device_id,
- unsigned int number_of_ports));
- MOCK_METHOD3(SetUserPermissionsForDevice,
- bool(const std::string&,
- const StringArray&,
- const StringArray&));
- MOCK_METHOD1(SetUserPermissionsForApp, bool(const PermissionConsent&));
- MOCK_METHOD1(IncreaseStatisticsData, bool(StatisticsType type));
- MOCK_METHOD3(SetAppRegistrationLanguage,
- bool(const std::string& app_id,
- LanguageType type,
- const std::string& language));
- MOCK_METHOD3(SetMetaInfo,
- bool(const std::string& ccpu_version,
- const std::string& wers_country_code,
- const std::string& vin));
- MOCK_METHOD0(IsMetaInfoPresent, bool());
- MOCK_METHOD1(SetSystemLanguage, bool(const std::string& language));
- MOCK_METHOD0(GetKmFromSuccessfulExchange, int());
- MOCK_METHOD0(GetDayFromScsExchange, int());
- MOCK_METHOD0(GetIgnitionsFromScsExchange, int());
- MOCK_CONST_METHOD1(Increment, void(const std::string& type));
- MOCK_CONST_METHOD2(Increment,
- void(const std::string& app_id, const std::string& type));
- MOCK_CONST_METHOD3(Set,
- void(const std::string& app_id,
- const std::string& type,
- const std::string& value));
- MOCK_CONST_METHOD3(Add,
- void(const std::string& app_id,
- const std::string& type,
- int seconds));
- MOCK_CONST_METHOD3(CountUnconsentedGroups,
- bool(const std::string& app_id,
- const std::string& device_id,
- int* count));
- MOCK_METHOD1(GetFunctionalGroupNames, bool(FunctionalGroupNames& names));
- MOCK_CONST_METHOD1(CleanupUnpairedDevices, bool(const DeviceIds& device_ids));
- MOCK_METHOD2(ReactOnUserDevConsentForApp,
- bool(const std::string& app_id, bool is_device_allowed));
- MOCK_METHOD1(SetPredataPolicy, bool(const std::string& app_id));
- MOCK_METHOD2(SetIsPredata, bool(const std::string& app_id, bool is_predata));
- MOCK_CONST_METHOD2(SetUnpairedDevice,
- bool(const std::string& device_id, bool unpaired));
- MOCK_CONST_METHOD1(UnpairedDevicesList, bool(DeviceIds* device_ids));
- MOCK_CONST_METHOD2(RemoveAppConsentForGroup,
- bool(const std::string& policy_app_id,
- const std::string& functional_group));
-};
-
-} // namespace policy
-
-#endif // SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_PT_EXT_REPRESENTATION_H_
diff --git a/src/components/policy/test/include/mock_pt_representation.h b/src/components/policy/test/include/mock_pt_representation.h
deleted file mode 100644
index 045c901be2..0000000000
--- a/src/components/policy/test/include/mock_pt_representation.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_PT_REPRESENTATION_H_
-#define SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_PT_REPRESENTATION_H_
-
-#include <string>
-#include <vector>
-
-#include "gmock/gmock.h"
-
-#include "policy/pt_representation.h"
-#include "rpc_base/rpc_base.h"
-#include "policy/policy_table/types.h"
-
-namespace policy_table = ::rpc::policy_table_interface_base;
-
-namespace policy {
-
-class MockPTRepresentation : virtual public PTRepresentation {
- public:
- MOCK_METHOD4(CheckPermissions,
- void(const PTString& app_id,
- const PTString& hmi_level,
- const PTString& rpc,
- CheckPermissionResult& result));
- MOCK_METHOD0(IsPTPreloaded, bool());
- MOCK_METHOD0(IgnitionCyclesBeforeExchange, int());
- MOCK_METHOD1(KilometersBeforeExchange, int(int current));
- MOCK_METHOD2(SetCountersPassedForSuccessfulUpdate,
- bool(int kilometers, int days_after_epoch));
- MOCK_METHOD1(DaysBeforeExchange, int(int current));
- MOCK_METHOD0(IncrementIgnitionCycles, void());
- MOCK_METHOD0(ResetIgnitionCycles, void());
- MOCK_METHOD0(TimeoutResponse, int());
- MOCK_METHOD1(SecondsBetweenRetries, bool(std::vector<int>* seconds));
- MOCK_METHOD2(GetPriority,
- bool(const std::string& app_id, std::string* priority));
- MOCK_CONST_METHOD0(GetVehicleInfo, const VehicleInfo());
- MOCK_METHOD1(SetVINValue, bool(const std::string& value));
- MOCK_METHOD2(
- GetUserFriendlyMsg,
- std::vector<UserFriendlyMessage>(const std::vector<std::string>& msg_code,
- const std::string& language));
- MOCK_METHOD2(GetUpdateUrls, void(int service_type, EndpointUrls&));
- MOCK_METHOD1(GetNotificationsNumber, int(const std::string& priority));
- MOCK_METHOD0(Init, InitResult());
- MOCK_METHOD0(Close, bool());
- MOCK_METHOD0(Clear, bool());
- MOCK_METHOD0(Drop, bool());
- MOCK_CONST_METHOD0(GenerateSnapshot, utils::SharedPtr<policy_table::Table>());
- MOCK_METHOD1(Save, bool(const policy_table::Table& table));
- MOCK_CONST_METHOD0(UpdateRequired, bool());
- MOCK_METHOD1(SaveUpdateRequired, void(bool value));
- MOCK_METHOD3(GetInitialAppData,
- bool(const std::string& app_id,
- StringArray* nicknames,
- StringArray* app_types));
-
- MOCK_METHOD4(SaveApplicationCustomData,
- bool(const std::string& app_id,
- bool is_revoked,
- bool is_default,
- bool is_predata));
-
- MOCK_CONST_METHOD1(IsApplicationRevoked, bool(const std::string& app_id));
- MOCK_METHOD1(GetFunctionalGroupings,
- bool(policy_table::FunctionalGroupings& groups));
- MOCK_CONST_METHOD1(IsApplicationRepresented, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(IsDefaultPolicy, bool(const std::string& app_id));
- MOCK_METHOD1(SetDefaultPolicy, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(IsPredataPolicy, bool(const std::string& app_id));
-};
-
-} // namespace policy
-
-#endif // SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_PT_REPRESENTATION_H_
diff --git a/src/components/policy/test/include/mock_update_status_manager.h b/src/components/policy/test/include/mock_update_status_manager.h
deleted file mode 100644
index aa6abd7301..0000000000
--- a/src/components/policy/test/include/mock_update_status_manager.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_UPDATE_STATUS_MANAGER_H_
-#define SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_UPDATE_STATUS_MANAGER_H_
-
-#include "gmock/gmock.h"
-
-#include "policy/update_status_manager.h"
-
-namespace policy {
-
-class MockUpdateStatusManager : public UpdateStatusManager {
- public:
- MOCK_METHOD1(set_listener, void(PolicyListener* listener));
- MOCK_METHOD1(OnUpdateSentOut, void(uint32_t update_timeout));
- MOCK_METHOD0(OnUpdateTimeoutOccurs, void());
- MOCK_METHOD0(OnValidUpdateReceived, void());
- MOCK_METHOD0(OnWrongUpdateReceived, void());
- MOCK_METHOD1(OnResetDefaultPT, void(bool is_update_required));
- MOCK_METHOD0(OnResetRetrySequence, void());
- MOCK_METHOD0(OnNewApplicationAdded, void());
- MOCK_METHOD1(OnPolicyInit, void(bool is_update_required));
- MOCK_METHOD0(GetUpdateStatus, PolicyTableStatus());
-};
-
-} // namespace policy
-
-#endif // SRC_COMPONENTS_POLICY_TEST_POLICY_INCLUDE_MOCK_UPDATE_STATUS_MANAGER_H_