2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 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.so.bpmn.common;
23 import static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertNotEquals;
25 import java.io.FileNotFoundException;
26 import java.io.IOException;
27 import org.junit.BeforeClass;
28 import org.junit.Test;
29 import org.onap.so.client.RestPropertiesLoader;
30 import org.onap.so.client.aai.AAIProperties;
31 import org.onap.so.client.dmaap.DmaapProperties;
32 import org.onap.so.client.dmaap.DmaapPropertiesLoader;
33 import org.onap.so.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer;
35 public class SPIPropertiesTest {
38 public static void beforeClass() {
39 System.setProperty("mso.config.path", "src/test/resources");
43 public void notEqual() {
44 DmaapProperties one = DmaapPropertiesLoader.getInstance().getNewImpl();
45 DmaapProperties two = DmaapPropertiesLoader.getInstance().getNewImpl();
46 assertNotEquals(one, two);
51 DmaapProperties one = DmaapPropertiesLoader.getInstance().getImpl();
52 DmaapProperties two = DmaapPropertiesLoader.getInstance().getImpl();
53 assertEquals(one, two);
57 public void restNotEqual() {
58 AAIProperties one = RestPropertiesLoader.getInstance().getNewImpl(AAIProperties.class);
59 AAIProperties two = RestPropertiesLoader.getInstance().getNewImpl(AAIProperties.class);
60 assertNotEquals(one, two);
64 public void restEqual() {
65 AAIProperties one = RestPropertiesLoader.getInstance().getImpl(AAIProperties.class);
66 AAIProperties two = RestPropertiesLoader.getInstance().getImpl(AAIProperties.class);
67 assertEquals(one, two);