b4d0b8d498b7af380e7311fc775da337952835a7
[so.git] /
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.onap.so.apihandlerinfra.BaseTest;
28 import org.springframework.beans.factory.annotation.Autowired;
29
30
31 public class OperationalEnvironmentPublisherTest extends BaseTest {
32
33     @Autowired
34     private OperationalEnvironmentPublisher publisher;
35
36     @Test
37     public void getProperties() throws FileNotFoundException, IOException {
38
39         assertEquals(
40                 "B3705D6C2D521257CC2422ACCF03B001811ACC49F564DDB3A2CF2A1378B6D35A23CDCB696F2E1EDFBE6758DFE7C74B94F4A7DF84A0E2BB904935AC4D900D5597DF981ADE6CE1FF3AF993BED0",
41                 publisher.getAuth());
42         assertEquals("07a7159d3bf51a0e53be7a8f89699be7", publisher.getKey());
43         assertEquals("test.operationalEnvironmentEvent", publisher.getTopic());
44         assertEquals("http://localhost:" + env.getProperty("wiremock.server.port"), publisher.getHost().get());
45     }
46 }