2 * ===============================LICENSE_START======================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============================LICENSE_END===========================================
21 package org.onap.dcae.apod.analytics.cdap.tca.it;
23 import org.junit.Test;
24 import org.onap.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAIT;
25 import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfig;
26 import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppConfigHolder;
27 import org.onap.dcae.apod.analytics.cdap.tca.settings.TCATestAppPreferences;
30 * @author Rajiv Singla . Creation Date: 10/25/2016.
32 public class TCAnalyticsAppConfigIT extends BaseAnalyticsCDAPTCAIT {
36 public void createTestAppConfigJson() throws Exception {
37 final TCATestAppConfig tcaTestAppConfig = getTCATestAppConfig();
38 final TCATestAppConfigHolder appConfigHolder = new TCATestAppConfigHolder(tcaTestAppConfig);
39 final String appConfigJson = serializeModelToJson(appConfigHolder);
40 LOG.info("AppConfigJson: \n{}", appConfigJson);
41 writeToOutputTextFile("appSettings/tca_app_config.json", appConfigJson, TCAnalyticsAppConfigIT.class);
45 public void createTestAppPreferencesJson() throws Exception {
46 final TCATestAppPreferences tcaTestAppPreferences = getTCATestAppPreferences();
47 final String appPreferencesJson = serializeModelToJson(tcaTestAppPreferences);
48 LOG.info("AppPreferences: \n{}", appPreferencesJson);
49 writeToOutputTextFile("appSettings/tca_app_preferences.json",
50 appPreferencesJson, TCAnalyticsAppConfigIT.class);