[SO] Release so 1.13.0 image
[so.git] / mso-api-handlers / mso-api-handler-infra / src / test / java / org / onap / so / apihandlerinfra / tenantisolation / dmaap / OperationalEnvironmentPublisherTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.so.apihandlerinfra.tenantisolation.dmaap;
22
23 import static org.junit.Assert.assertEquals;
24 import java.io.FileNotFoundException;
25 import java.io.IOException;
26 import org.junit.Test;
27 import org.junit.runner.RunWith;
28 import org.onap.so.apihandlerinfra.ApiHandlerApplication;
29 import org.onap.so.apihandlerinfra.BaseTest;
30 import org.springframework.beans.factory.annotation.Autowired;
31 import org.springframework.boot.test.context.SpringBootTest;
32 import org.springframework.test.context.ActiveProfiles;
33 import org.springframework.test.context.junit4.SpringRunner;
34
35
36 public class OperationalEnvironmentPublisherTest extends BaseTest {
37
38     @Autowired
39     private OperationalEnvironmentPublisher publisher;
40
41     @Test
42     public void getProperties() throws FileNotFoundException, IOException {
43
44         assertEquals(
45                 "B3705D6C2D521257CC2422ACCF03B001811ACC49F564DDB3A2CF2A1378B6D35A23CDCB696F2E1EDFBE6758DFE7C74B94F4A7DF84A0E2BB904935AC4D900D5597DF981ADE6CE1FF3AF993BED0",
46                 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());
50     }
51 }