93c9e2f6294b7030a29e01d8f566b86870a1ed53
[dcaegen2/services/mapper.git] /
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : DCAE
4 * ================================================================================
5 * Copyright 2018 TechMahindra
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 /*package org.onap.universalvesadapter.service;
21
22 import static org.junit.Assert.assertEquals;
23 import static org.mockito.Mockito.when;
24
25 import java.net.URI;
26
27 import org.junit.Test;
28 import org.junit.runner.RunWith;
29 import org.mockito.Matchers;
30 import org.onap.universalvesadapter.Application;
31 import org.onap.universalvesadapter.exception.ConfigFileReadException;
32 import org.onap.universalvesadapter.service.DiskRepoConfigFileService;
33 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory;
35 import org.springframework.beans.factory.annotation.Autowired;
36 import org.springframework.boot.test.context.SpringBootTest;
37 import org.springframework.boot.test.mock.mockito.MockBean;
38 import org.springframework.http.HttpStatus;
39 import org.springframework.http.ResponseEntity;
40 import org.springframework.test.context.junit4.SpringRunner;
41 import org.springframework.web.client.RestTemplate;
42
43 @RunWith(SpringRunner.class)
44 @SpringBootTest(classes = Application.class)
45 public class DiskRepoConfigFileServiceTest {
46
47     @Autowired
48     DiskRepoConfigFileService diskRepoConfigFileService;
49     
50     private final Logger eLOGGER = LoggerFactory.getLogger(this.getClass());
51     
52     @Test
53     public void testReadConfigFile() {
54         
55         String result = "test file";
56         
57         
58         try {
59             String readConfigFile = diskRepoConfigFileService.readConfigFile("testCase.xml");
60             assertEquals(result, readConfigFile);
61         } catch (ConfigFileReadException exception) {
62             eLOGGER.error("Error occurred : ", exception );
63         }
64         
65     }
66
67 }*/