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.apihandlerinfra.tenantisolation.dmaap;
23 import static org.junit.Assert.assertEquals;
25 import java.io.FileNotFoundException;
26 import java.io.IOException;
28 import org.junit.Test;
29 import org.junit.runner.RunWith;
30 import org.onap.so.apihandlerinfra.ApiHandlerApplication;
31 import org.onap.so.apihandlerinfra.BaseTest;
32 import org.springframework.beans.factory.annotation.Autowired;
33 import org.springframework.boot.test.context.SpringBootTest;
34 import org.springframework.test.context.ActiveProfiles;
35 import org.springframework.test.context.junit4.SpringRunner;
38 public class OperationalEnvironmentPublisherTest extends BaseTest {
41 private OperationalEnvironmentPublisher publisher;
44 public void getProperties() throws FileNotFoundException, IOException {
46 assertEquals("B3705D6C2D521257CC2422ACCF03B001811ACC49F564DDB3A2CF2A1378B6D35A23CDCB696F2E1EDFBE6758DFE7C74B94F4A7DF84A0E2BB904935AC4D900D5597DF981ADE6CE1FF3AF993BED0", publisher.getAuth());
47 assertEquals("07a7159d3bf51a0e53be7a8f89699be7", publisher.getKey());
48 assertEquals("test.operationalEnvironmentEvent", publisher.getTopic());
49 assertEquals("http://localhost:" + env.getProperty("wiremock.server.port"), publisher.getHost().get());