/*-
* ============LICENSE_START=======================================================
* ONAP - CCSDK
* ================================================================================
* Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
*/
package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer;
import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.addSpace;
/**
* Unit test case utilities for identifier validation and restconf api
* call node.
*/
public final class IdentifierValidationUtilsTest {
static final String ENCODE_TO_JSON_YANG_COMMON_ID = "\n " +
"\"test_augment_1_for_module:name_of_the_ll6\": [\n" +
" \"unbounded\",\n" +
" \"8\"\n" +
" ],\n" +
" \"test_augment_1_for_module:name_of_the_cont13\": {\n" +
" \"name_of_the_cont12\": {\n" +
" \"name_of_the_leaf26\": \"abc\"\n" +
" },\n" +
" \"name_of_the_ll9\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_leaf28\": \"abc\",\n" +
" \"name_of_the_list9\": [\n" +
" {\n" +
" \"name_of_the_leaf27\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf27\": \"abc\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" \"test_augment_1_for_module:name_of_the_list7\": [\n" +
" {\n" +
" \"name_of_the_leaf14\": \"test\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf14\": \"create\"\n" +
" }\n" +
" ],\n" +
" \"test_augment_1_for_module:name_of_the_leaf15\": \"abc\",\n" +
" \"test_augment_1_for_module:name_of_the_cont5\": {\n" +
" \"name_of_the_leaf13\": \"true\"\n" +
" }";
static final String ENCODE_TO_JSON_YANG_AUG_POST_ID = "{\n" +
" \"test_name_of_the_module:name_of_the_leaf10\": \"abc\"," +
ENCODE_TO_JSON_YANG_COMMON_ID + "\n}";
static final String ENCODE_TO_JSON_YANG_ID = "{\n" +
" \"test_name_of_the_module:name_of_the_cont2\": {\n" +
" \"name_of_the_ll4\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_leaf5\": \"abc\",\n" +
" \"name_of_the_list6\": [\n" +
" {\n" +
" \"name_of_the_leaf11\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf11\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_ll5\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_ll3\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_leaf6\": \"abc\",\n" +
" \"name_of_the_cont3\": {\n" +
" \"name_of_the_leaf10\": \"abc\"\n" +
" },\n" +
" \"name_of_the_list2\": [\n" +
" {\n" +
" \"name_of_the_leaf4\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf4\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_list1\": [\n" +
" {\n" +
" \"name_of_the_ll2\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_list5\": [\n" +
" {\n" +
" \"name_of_the_leaf9\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf9\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_list4\": [\n" +
" {\n" +
" \"name_of_the_leaf8\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf8\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_leaf1\": \"true\",\n" +
" \"name_of_the_leaf3\": \"abc\",\n" +
" \"name_of_the_leaf2\": \"abc\",\n" +
" \"name_of_the_cont4\": {\n" +
" \"name_of_the_leaf11\": \"abc\"\n" +
" },\n" +
" \"name_of_the_ll1\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"name_of_the_ll2\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_list5\": [\n" +
" {\n" +
" \"name_of_the_leaf9\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf9\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_list4\": [\n" +
" {\n" +
" \"name_of_the_leaf8\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf8\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_leaf1\": \"true\",\n" +
" \"name_of_the_leaf3\": \"abc\",\n" +
" \"name_of_the_leaf2\": \"abc\",\n" +
" \"name_of_the_cont4\": {\n" +
" \"name_of_the_leaf11\": \"abc\"\n" +
" },\n" +
" \"name_of_the_ll1\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ]\n" +
" }\n" +
" ],\n" +
" \"name_of_the_cont4\": {\n" +
" \"name_of_the_leaf10\": \"abc\"," +
addSpace(ENCODE_TO_JSON_YANG_COMMON_ID,8) + "\n" +
" },\n" +
" \"name_of_the_leaf12\": \"abc\"\n" +
" }\n" +
"}";
static final String ENCODE_TO_JSON_WITH_AUG_PATH = "{\n" +
" \"test_augment_1_for_module:name_of_the_leaf13\": \"true\"\n" +
"}";
static final String ENCODE_TO_JSON_YANG_PUT_ID = "{\n" +
" \"test_name_of_the_module:name_of_the_cont4\": {" + addSpace(
ENCODE_TO_JSON_YANG_COMMON_ID, 4) + ",\n" +
" \"name_of_the_leaf10\": \"abc\"\n" +
" }\n" +
"}";
static final String ENCODE_TO_XML_YANG_COMMON_ID = "\n" +
"unbounded\n" +
"8\n" +
"\n" +
" \n" +
" abc\n" +
" \n" +
" abc\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
"\n" +
"\n" +
" test\n" +
"\n" +
"\n" +
" create\n" +
"\n" +
"abc\n" +
"\n" +
" true\n" +
"";
static final String ENCODE_TO_XML_YANG_AUG_POST_ID = "\n" +
"abc" +
ENCODE_TO_XML_YANG_COMMON_ID + "\n";
static final String ENCODE_TO_XML_YANG_PUT_ID = "\n" +
"\n" +
" abc" +
addSpace(ENCODE_TO_XML_YANG_COMMON_ID, 4) + "\n\n";
static final String ENCODE_TO_XML_YANG_ID= "\n" +
"\n" +
" abc\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" abc\n" +
" abc\n" +
" abc\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" true\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" abc\n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" true\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" abc\n" +
" abc\n" +
" \n" +
" \n" +
" abc" +
addSpace(ENCODE_TO_XML_YANG_COMMON_ID, 8) + "\n" +
" \n" +
" abc\n" +
"\n";
static final String ENCODE_TO_JSON_RPC_ID = "{\n" +
" \"test_name_of_the_module:input\": {\n" +
" \"name_of_the_cont14\": {\n" +
" \"name_of_the_leaf28\": \"abc\"\n" +
" },\n" +
" \"name_of_the_cont13\": {\n" +
" \"name_of_the_ll9\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_leaf28\": \"abc\",\n" +
" \"name_of_the_list9\": [\n" +
" {\n" +
" \"name_of_the_leaf27\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf27\": \"abc\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" \"name_of_the_leaf30\": \"abc\",\n" +
" \"name_of_the_ll10\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_list10\": [\n" +
" {\n" +
" \"name_of_the_leaf29\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf29\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_cont15\": {\n" +
" \"name_of_the_leaf31\": \"abc\"\n" +
" }\n" +
" }\n" +
"}";
static final String DECODE_FROM_JSON_RPC_ID = "{\n" +
" \"test_name_of_the_module:output\": {\n" +
" \"name_of_the_cont16\": {\n" +
" \"name_of_the_leaf32\": \"abc\"\n" +
" },\n" +
" \"name_of_the_list11\": [\n" +
" {\n" +
" \"name_of_the_leaf33\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf33\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_leaf34\": \"abc\",\n" +
" \"name_of_the_ll11\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_cont17\": {\n" +
" \"name_of_the_leaf35\": \"abc\"\n" +
" },\n" +
" \"name_of_the_cont13\": {\n" +
" \"name_of_the_cont12\": {\n" +
" \"name_of_the_leaf26\": \"abc\"\n" +
" },\n" +
" \"name_of_the_list9\": [\n" +
" {\n" +
" \"name_of_the_leaf27\": \"abc\"\n" +
" },\n" +
" {\n" +
" \"name_of_the_leaf27\": \"abc\"\n" +
" }\n" +
" ],\n" +
" \"name_of_the_ll9\": [\n" +
" \"abc\",\n" +
" \"abc\"\n" +
" ],\n" +
" \"name_of_the_leaf28\": \"abc\"\n" +
" }\n" +
" }\n" +
"}";
static final String ENCODE_TO_XML_RPC_ID = "\n" +
"\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" abc\n" +
" abc\n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
" \n" +
" abc\n" +
" \n" +
"\n";
static final String DECODE_FROM_XML_RPC_ID = "\n" +
"";
}