diff options
4 files changed, 79 insertions, 79 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/AAISetup.java b/aai-core/src/test/java/org/onap/aai/AAISetup.java index 08a7793a..b7a4f740 100644 --- a/aai-core/src/test/java/org/onap/aai/AAISetup.java +++ b/aai-core/src/test/java/org/onap/aai/AAISetup.java @@ -69,26 +69,26 @@ public abstract class AAISetup { public final SpringMethodRule springMethodRule = new SpringMethodRule(); @Autowired - protected Map<SchemaVersion, MoxyLoader> moxyLoaderInstance; - - @Autowired - protected HttpEntry traversalHttpEntry; - - @Autowired - protected HttpEntry traversalUriHttpEntry; - - @Autowired - protected NodeIngestor nodeIngestor; - - @Autowired - protected LoaderFactory loaderFactory; + protected Map<SchemaVersion, MoxyLoader> moxyLoaderInstance; + + @Autowired + protected HttpEntry traversalHttpEntry; + + @Autowired + protected HttpEntry traversalUriHttpEntry; + + @Autowired + protected NodeIngestor nodeIngestor; + + @Autowired + protected LoaderFactory loaderFactory; - @Autowired - protected SchemaVersions schemaVersions; + @Autowired + protected SchemaVersions schemaVersions; - @Value("${schema.uri.base.path}") - protected String basePath; - + @Value("${schema.uri.base.path}") + protected String basePath; + protected static final String SERVICE_NAME = "JUNIT"; @BeforeClass @@ -98,7 +98,7 @@ public abstract class AAISetup { System.setProperty("aai.service.name", SERVICE_NAME); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/bundleconfig-local/etc/oxm/"); } - - - + + + } diff --git a/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java b/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java index 90b1ccd0..07731770 100644 --- a/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java +++ b/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java @@ -53,10 +53,10 @@ public abstract class AAISetupForSwagger { public final SpringMethodRule springMethodRule = new SpringMethodRule(); - @Autowired - protected NodeIngestor nodeIngestor; - - + @Autowired + protected NodeIngestor nodeIngestor; + + protected static final String SERVICE_NAME = "JUNIT"; @BeforeClass @@ -66,7 +66,7 @@ public abstract class AAISetupForSwagger { System.setProperty("aai.service.name", SERVICE_NAME); QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/bundleconfig-local/etc/oxm/"); } - - - + + + } diff --git a/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java b/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java index 7055b918..dc32e932 100644 --- a/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java +++ b/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java @@ -34,52 +34,52 @@ import org.onap.aai.util.AAIConstants; */ public abstract class AbstractConfigTranslator extends ConfigTranslator { - public AbstractConfigTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } + public AbstractConfigTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } - + - /* (non-Javadoc) - * @see org.onap.aai.setup.ConfigTranslator#getNodeFiles() - */ - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - String prefix = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP ; - - String suffix = ".xml"; - - Map<SchemaVersion, List<String>> files = new TreeMap<>(); - for (SchemaVersion v : schemaVersions.getVersions()) { - - List<String> container = getVersionNodeFiles(v); - - - files.put(v, container); - } - - return files; - } - + /* (non-Javadoc) + * @see org.onap.aai.setup.ConfigTranslator#getNodeFiles() + */ + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + String prefix = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP ; + + String suffix = ".xml"; + + Map<SchemaVersion, List<String>> files = new TreeMap<>(); + for (SchemaVersion v : schemaVersions.getVersions()) { + + List<String> container = getVersionNodeFiles(v); + + + files.put(v, container); + } + + return files; + } + - public List<String> getVersionNodeFiles(SchemaVersion v) { - Pattern p = Pattern.compile("aai(.*)"+"_oxm_(.*).xml" ); - - List<String> container = new ArrayList<>(); - String directoryName = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP + v.toString() + AAIConstants.AAI_FILESEP ; - - File[] files = new File(directoryName).listFiles(); - for (File f : files) { - String fileName = f.getName(); - Matcher m = p.matcher(fileName); - if (m.find()) { - String file = directoryName + m.group(); - container.add(file.toString()); - } + public List<String> getVersionNodeFiles(SchemaVersion v) { + Pattern p = Pattern.compile("aai(.*)"+"_oxm_(.*).xml" ); + + List<String> container = new ArrayList<>(); + String directoryName = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP + v.toString() + AAIConstants.AAI_FILESEP ; + + File[] files = new File(directoryName).listFiles(); + for (File f : files) { + String fileName = f.getName(); + Matcher m = p.matcher(fileName); + if (m.find()) { + String file = directoryName + m.group(); + container.add(file.toString()); + } - } - return container; - - } + } + return container; + + } } diff --git a/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java b/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java index 1fd85fb7..82a3efdf 100644 --- a/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java +++ b/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java @@ -52,11 +52,11 @@ import static org.mockito.Mockito.when; public class HttpTestUtil extends RESTAPI { - - protected HttpEntry traversalHttpEntry; - - protected HttpEntry traversalUriHttpEntry; - + + protected HttpEntry traversalHttpEntry; + + protected HttpEntry traversalUriHttpEntry; + private static final EELFLogger logger = EELFManager.getInstance().getLogger(HttpTestUtil.class); protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json"); @@ -179,9 +179,9 @@ public class HttpTestUtil extends RESTAPI { response = responsesTuple.getValue1().get(0).getValue1(); } catch (AAIException e) { - response = this.consumerExceptionResponseGenerator(httpHeaders, uriInfo, HttpMethod.PUT, e); - success = false; - } catch(Exception e){ + response = this.consumerExceptionResponseGenerator(httpHeaders, uriInfo, HttpMethod.PUT, e); + success = false; + } catch(Exception e){ AAIException ex = new AAIException("AAI_4000", e); response = this.consumerExceptionResponseGenerator(httpHeaders, uriInfo, HttpMethod.PUT, ex); success = false; |