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 org.onap.aaf.cadi.aaf.v2_0.test;
24 import java.net.HttpURLConnection;
26 import static org.junit.Assert.*;
28 import org.junit.After;
29 import org.junit.AfterClass;
30 import org.junit.Before;
31 import org.junit.BeforeClass;
32 import org.junit.Test;
33 import org.onap.aaf.cadi.PropAccess;
34 import org.onap.aaf.cadi.Locator.Item;
35 import org.onap.aaf.cadi.aaf.v2_0.AAFLocator;
36 import org.onap.aaf.cadi.aaf.v2_0.AbsAAFLocator;
37 import org.onap.aaf.cadi.config.Config;
38 import org.onap.aaf.cadi.config.SecurityInfoC;
39 import org.onap.aaf.misc.env.impl.BasicTrans;
40 import org.onap.aaf.misc.rosetta.env.RosettaEnv;
42 public class JU_AAFLocator {
45 public static void setUpBeforeClass() throws Exception {
49 public static void tearDownAfterClass() throws Exception {
53 public void setUp() throws Exception {
57 public void tearDown() throws Exception {
62 // TODO: Ian [JUnit] This fails because these files don't exist
65 // PropAccess propAccess = new PropAccess("cadi_prop_files=/opt/app/aaf/common/com.att.aaf.common.props:/opt/app/aaf/common/com.att.aaf.props");
66 // SecurityInfoC<HttpURLConnection> si = SecurityInfoC.instance(propAccess, HttpURLConnection.class);
67 // String alu = propAccess.getProperty(Config.AAF_LOCATE_URL,"https://mithrilcsp.sbc.com:8095/locate");
68 // URI locatorURI = new URI(alu+"/com.att.aaf.service/2.0");
69 // AbsAAFLocator<BasicTrans> al = new AAFLocator(si, locatorURI);
70 // Assert.assertTrue(al.refresh());
71 // Item i = al.first();
74 // System.out.println("hi");
75 // } catch (Exception e) {
76 // e.printStackTrace();