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.locator.test;
26 import org.junit.AfterClass;
27 import org.junit.Test;
28 import org.onap.aaf.cadi.Locator.Item;
29 import org.onap.aaf.cadi.locator.PropertyLocator;
31 import static org.junit.Assert.*;
33 public class JU_PropertyLocator {
36 public static void tearDownAfterClass() throws Exception {
40 public void test() throws Exception {
42 // TODO: Ian - Fix this test
45 // PropertyLocator pl = new PropertyLocator("https://localhost:2345,https://fred.wilma.com:26444,https://tom.jerry.com:534");
49 // boolean print = false;
50 // for(int j=0;j<900000;++j) {
52 // for(i = pl.first();i!=null;i=pl.next(i)) {
53 // URI loc = pl.get(i);
54 // if(print)System.out.println(loc.toString());
57 // assertEquals(3,count);
58 // assertTrue(pl.hasItems());
59 // if(print)System.out.println("---");
60 // pl.invalidate(pl.best());
63 // for(i = pl.first();i!=null;i=pl.next(i)) {
64 // URI loc = pl.get(i);
65 // if(print)System.out.println(loc.toString());
69 // assertEquals(2,count);
70 // assertTrue(pl.hasItems());
71 // if(print)System.out.println("---");
72 // pl.invalidate(pl.best());
75 // for(i = pl.first();i!=null;i=pl.next(i)) {
76 // URI loc = pl.get(i);
77 // if(print)System.out.println(loc.toString());
81 // assertEquals(1,count);
82 // assertTrue(pl.hasItems());
83 // if(print)System.out.println("---");
84 // pl.invalidate(pl.best());
87 // for(i = pl.first();i!=null;i=pl.next(i)) {
88 // URI loc = pl.get(i);
89 // if(print)System.out.println(loc.toString());
93 // assertEquals(0,count);
94 // assertFalse(pl.hasItems());