Implement PkgGetDBHandler unit test
[platform/core/appfw/pkgmgr-info.git] / test / unit_tests / parcel_utils.hh
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #include <string>
17 #include <vector>
18
19 #include "pkgmgrinfo_basic.h"
20 #include "pkgmgrinfo_private.h"
21
22 application_x *GetTestApplication(std::string appid);
23
24 bool IsEqualApplications(const std::vector<application_x *>& applicationsA,
25     const std::vector<application_x *>& applicationsB);
26
27 package_x *GetTestPackage(std::string pkgid);
28
29 bool IsEqualPackages(const std::vector<package_x *>&packagesA,
30     const std::vector<package_x *>&packagesB);
31
32 pkgmgrinfo_filter_x *GetTestFilter();
33
34 bool IsEqualFilter(const pkgmgrinfo_filter_x *filterA,
35     const pkgmgrinfo_filter_x *filterB);
36
37 pkgmgr_certinfo_x *GetTestCertInfo();
38
39 bool IsEqualCertInfo(const pkgmgr_certinfo_x *certA,
40     const pkgmgr_certinfo_x *certB);
41
42 dependency_x *GetTestDepInfo(std::string pkgid);
43
44 bool IsEqualDepInfo(const std::vector<dependency_x *>& depA,
45     const std::vector<dependency_x *>& depB);