Integrate aai-schema-ingest library into aai-core
[aai/aai-common.git] / aai-schema-ingest / src / test / java / org / onap / aai / testutils / GoodConfigForValidationTest.java
1 /** 
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-18 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.aai.testutils;
22
23 import java.util.*;
24
25 import org.onap.aai.setup.ConfigTranslator;
26 import org.onap.aai.setup.SchemaLocationsBean;
27 import org.onap.aai.setup.SchemaVersion;
28 import org.onap.aai.setup.SchemaVersions;
29
30 /**
31  * All schema files here are valid for sunny day validator testing
32  */
33 public class GoodConfigForValidationTest extends ConfigTranslator {
34
35         private SchemaVersions schemaVersions;
36
37         public GoodConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) {
38                 super(bean, schemaVersions);
39                 this.schemaVersions = schemaVersions;
40         }
41
42         @Override
43         public Map<SchemaVersion, List<String>> getNodeFiles() {
44                 List<String> files = new ArrayList<>();
45                 files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml");
46                 Map<SchemaVersion, List<String>> input = new TreeMap<>();
47                 //input.put(SchemaVersion.getLatest(), files);
48                 for (SchemaVersion v : schemaVersions.getVersions()) {
49                         input.put(v, files);
50                 }
51                 return input;
52         }
53
54         @Override
55         public Map<SchemaVersion, List<String>> getEdgeFiles() {
56                 Map<SchemaVersion, List<String>> input = new TreeMap<>();
57                 List<String> files = new ArrayList<>();
58                 files.add("src/test/resources/edgeRules/test3.json");
59                 //input.put(SchemaVersion.getLatest(), files);
60                 for (SchemaVersion v : schemaVersions.getVersions()) {
61                         input.put(v, files);
62                 }
63                 return input;
64         }
65
66         
67 }