diff --git a/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp b/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp index 2a32123c08769c02eda54be8631d2d7539d769c8..238243b484c2cc70138f37c89e535e5b84588499 100755 --- a/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp +++ b/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "abs_result_set.h" +#include "result_set.h" #include "rdb_errno.h" namespace { @@ -27,7 +27,7 @@ void MockGoToFirstRow(bool mockRet) namespace OHOS { namespace NativeRdb { -int AbsResultSet::GoToFirstRow() +int ResultSet::GoToFirstRow() { if (g_mockGoToFirstRowRet == false) { return E_ERROR; diff --git a/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp b/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp index f1aa458be60f1471be5829ed53d146efd4e7384b..92cc024cbf0c3eabef39e3fd6868e0552eb292a6 100755 --- a/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp +++ b/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp @@ -24,6 +24,7 @@ #undef private #undef protected #include "rdb_store.h" +#include "result_set.h" #include "value_object.h" namespace { @@ -102,7 +103,7 @@ class RdbStoreTest : public RdbStore { { return NativeRdb::E_ERROR; }; - virtual std::shared_ptr Query(int &errCode, bool distinct, const std::string &table, + virtual std::shared_ptr Query(int &errCode, bool distinct, const std::string &table, const std::vector &columns, const std::string &whereClause = "", const std::vector &bindArgs = {}, const std::string &groupBy = "", const std::string &indexName = "", const std::string &orderBy = "", @@ -111,12 +112,12 @@ class RdbStoreTest : public RdbStore { { return nullptr; }; - virtual std::shared_ptr QuerySql( + virtual std::shared_ptr QuerySql( const std::string &sql, const std::vector &selectionArgs) { return nullptr; }; - virtual std::shared_ptr QuerySql( + virtual std::shared_ptr QuerySql( const std::string &sql, const std::vector &selectionArgs = {}) { return nullptr; @@ -173,13 +174,12 @@ class RdbStoreTest : public RdbStore { { return NativeRdb::E_ERROR; }; - virtual std::shared_ptr Query( + virtual std::shared_ptr Query( const AbsRdbPredicates &predicates, const std::vector &columns) { if (g_mockQueryRet == false) { - std::string name = "aa"; - std::shared_ptr resultSet = - std::make_unique(name); + std::shared_ptr resultSet = + std::make_unique(); return resultSet; } return nullptr;