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.openecomp.mso.bpmn.common;
23 import static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertNotEquals;
26 import java.io.FileNotFoundException;
27 import java.io.IOException;
29 import org.junit.BeforeClass;
30 import org.junit.Test;
31 import org.openecomp.mso.client.RestPropertiesLoader;
32 import org.openecomp.mso.client.aai.AAIProperties;
33 import org.openecomp.mso.client.dmaap.DmaapProperties;
34 import org.openecomp.mso.client.dmaap.DmaapPropertiesLoader;
35 import org.openecomp.mso.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer;
37 public class SPIPropertiesTest {
40 public static void beforeClass() {
41 System.setProperty("mso.config.path", "src/test/resources");
45 public void notEqual() {
46 DmaapProperties one = DmaapPropertiesLoader.getInstance().getNewImpl();
47 DmaapProperties two = DmaapPropertiesLoader.getInstance().getNewImpl();
48 assertNotEquals(one, two);
52 DmaapProperties one = DmaapPropertiesLoader.getInstance().getImpl();
53 DmaapProperties two = DmaapPropertiesLoader.getInstance().getImpl();
54 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);
63 public void restEqual() {
64 AAIProperties one = RestPropertiesLoader.getInstance().getImpl(AAIProperties.class);
65 AAIProperties two = RestPropertiesLoader.getInstance().getImpl(AAIProperties.class);
66 assertEquals(one, two);