1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef NATIVE_RDB_TEST_COMMON_H
17 #define NATIVE_RDB_TEST_COMMON_H
18 
19 #include <string>
20 #include "values_bucket.h"
21 
22 namespace OHOS {
23 namespace NativeRdb {
24 
25 static const std::string RDB_TEST_PATH = "/data/test/";
26 struct RowData {
27     int id;
28     std::string name;
29     int age;
30     double salary;
31     std::vector<uint8_t> blobType;
32     AssetValue asset;
33     std::vector<AssetValue> assets;
34 };
35 
36 struct RowDatas {
37     int id;
38     std::string eName;
39     int jobId;
40     ValueObject mgr;
41     std::string joinDate;
42     double salary;
43     ValueObject bonus;
44     int deptId;
45 };
46 
47 class UTUtils {
48 public:
49     static ValuesBucket SetRowData(const RowData &rowData);
50 
51     static ValuesBucket SetRowDatas(const RowDatas &rowDatas);
52 
53     static const RowData g_rowData[3];
54 
55     static const RowDatas gRowDatas[14];
56 };
57 
58 } // namespace NativeRdb
59 } // namespace OHOS
60 
61 #endif
62