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 FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_TEST_MOCK_INCLUDE_JSON_CONSTANTS_H 17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_TEST_MOCK_INCLUDE_JSON_CONSTANTS_H 18 19 #include "nlohmann/json.hpp" 20 21 namespace OHOS { 22 namespace AppExecFwk { 23 namespace JsonConstants { 24 const nlohmann::json NOT_STRING_TYPE = R"( 25 { 26 "number": 234, 27 "bool": true, 28 "object": {}, 29 "array": [] 30 } 31 )"_json; 32 33 const nlohmann::json NOT_NUMBER_TYPE = R"( 34 { 35 "string": "info", 36 "object": {}, 37 "array": [] 38 } 39 )"_json; 40 41 const nlohmann::json NOT_BOOL_TYPE = R"( 42 { 43 "number": 234, 44 "string": "info", 45 "object": {}, 46 "array": [] 47 } 48 )"_json; 49 50 const nlohmann::json NOT_OBJECT_TYPE = R"( 51 { 52 "bool": true, 53 "number": 234, 54 "string": "info", 55 "array": [] 56 } 57 )"_json; 58 59 const nlohmann::json NOT_ARRAY_TYPE = R"( 60 { 61 "bool": true, 62 "number": 234, 63 "string": "info", 64 "object": {} 65 } 66 )"_json; 67 } // namespace JsonConstants 68 } // namespace AppExecFwk 69 } // namespace OHOS 70 #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_TEST_MOCK_INCLUDE_JSON_CONSTANTS_H