2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 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====================================================
22 package com.att.dao.aaf.test;
24 import org.junit.After;
25 import org.junit.AfterClass;
26 import org.junit.Before;
27 import org.junit.BeforeClass;
28 import org.junit.Test;
29 import org.onap.aaf.cadi.PropAccess;
30 import org.onap.aaf.misc.env.APIException;
31 import org.onap.aaf.misc.env.Data;
32 import org.onap.aaf.misc.env.Data.TYPE;
33 import org.onap.aaf.misc.rosetta.env.RosettaDF;
34 import org.onap.aaf.misc.rosetta.env.RosettaEnv;
36 import locate.v1_0.MgmtEndpoint;
37 import locate.v1_0.MgmtEndpoint.SpecialPorts;
38 import locate.v1_0.MgmtEndpoints;
40 public class JU_LocationContent {
43 public static void setUpBeforeClass() throws Exception {
47 public static void tearDownAfterClass() throws Exception {
51 public void setUp() throws Exception {
55 public void tearDown() throws Exception {
60 PropAccess access = new PropAccess();
61 RosettaEnv env = new RosettaEnv(access.getProperties());
63 RosettaDF<MgmtEndpoints> medf = env.newDataFactory(MgmtEndpoints.class);
65 medf.option(Data.PRETTY);
66 MgmtEndpoint me = new MgmtEndpoint();
67 me.setHostname("mithrilcsp.sbc.com");
74 me.setProtocol("http");
75 me.getSubprotocol().add("TLS1.1");
77 SpecialPorts sp = new SpecialPorts();
80 sp.setProtocol("java");
81 me.getSpecialPorts().add(sp);
83 MgmtEndpoints mes = new MgmtEndpoints();
84 mes.getMgmtEndpoint().add(me);
85 System.out.println(medf.newData().load(mes).asString());
87 } catch (APIException e) {