2 * Copyright (C) 2019 Samsung. All rights reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.onap.config.test;
19 import org.junit.Test;
20 import org.onap.config.type.ConfigurationQuery;
22 import static org.junit.Assert.assertEquals;
23 import static org.junit.Assert.assertTrue;
25 public class ConfigurationQueryTest {
26 private static String TENANT = "OPENECOMP";
27 private static String NAMESPACE = "tetsNamepspace";
28 private static String KEY = "testKey";
31 public void testConfigurationQueryBuild() {
33 ConfigurationQuery configurationQuery = new ConfigurationQuery();
36 configurationQuery = configurationQuery
46 assertEquals(TENANT.toUpperCase(), configurationQuery.getTenant());
47 assertEquals(NAMESPACE.toUpperCase(), configurationQuery.getNamespace());
48 assertEquals(KEY, configurationQuery.getKey());
49 assertTrue(configurationQuery.isExternalLookup());
50 assertTrue(configurationQuery.isFallback());
51 assertTrue(configurationQuery.isLatest());
52 assertTrue(configurationQuery.isNodeSpecific());