diff options
author | Steve Smokowski <ss835w@att.com> | 2017-02-20 17:55:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@openecomp.org> | 2017-02-20 17:55:36 +0000 |
commit | 73e492c5160f51101c8df56f24d4557b3786197a (patch) | |
tree | 757078559deb2ac00be65e44975a9c37d7ab18b9 | |
parent | c8250c2b416bdc277f53867d9140a54728ea1eca (diff) | |
parent | e909dbdc4a1bc92858c147d14fe69b659f6f51e0 (diff) |
Merge changes I03028173,I5319aa44,I0b5d1ace,I926b7e34
* changes:
removed vestigial testing code
increased version number of license plugin
ignore bin folder
added reference to Java1.8 jdk.tools
-rw-r--r-- | ajsc-aai/.gitignore | 15 | ||||
-rw-r--r-- | ajsc-aai/pom.xml | 9 | ||||
-rw-r--r-- | ajsc-aai/src/test/java/org/openecomp/aai/util/AAIApiServerURLBaseTest.java | 31 | ||||
-rw-r--r-- | pom.xml | 2 |
4 files changed, 29 insertions, 28 deletions
diff --git a/ajsc-aai/.gitignore b/ajsc-aai/.gitignore index 2a36faf..752f5a0 100644 --- a/ajsc-aai/.gitignore +++ b/ajsc-aai/.gitignore @@ -1,7 +1,8 @@ -.settings
-target/
-**/logs/
-bundleconfig-local/etc/oxm
-bundleconfig-local/etc/logback.xml
-/.pydevproject
-/test_csvWriter.csv
+.settings +target/ +**/logs/ +bundleconfig-local/etc/oxm +bundleconfig-local/etc/logback.xml +/.pydevproject +/test_csvWriter.csv +/bin/ diff --git a/ajsc-aai/pom.xml b/ajsc-aai/pom.xml index 01c9750..f4c2e1c 100644 --- a/ajsc-aai/pom.xml +++ b/ajsc-aai/pom.xml @@ -86,8 +86,13 @@ <artifactId>commons-collections</artifactId> </dependency> - - + <dependency> + <groupId>jdk.tools</groupId> + <artifactId>jdk.tools</artifactId> + <version>1.8.0</version> + <scope>system</scope> + <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath> + </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> diff --git a/ajsc-aai/src/test/java/org/openecomp/aai/util/AAIApiServerURLBaseTest.java b/ajsc-aai/src/test/java/org/openecomp/aai/util/AAIApiServerURLBaseTest.java index b016c7a..5d6bd7b 100644 --- a/ajsc-aai/src/test/java/org/openecomp/aai/util/AAIApiServerURLBaseTest.java +++ b/ajsc-aai/src/test/java/org/openecomp/aai/util/AAIApiServerURLBaseTest.java @@ -20,7 +20,8 @@ package org.openecomp.aai.util; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.HashMap; @@ -30,35 +31,29 @@ import java.util.Map; import org.apache.cxf.message.Message; import org.apache.cxf.message.MessageImpl; import org.apache.cxf.phase.PhaseInterceptorChain; -import org.junit.Rule; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; -import org.openecomp.aai.util.AAIApiServerURLBase; -import org.openecomp.aai.util.AAIConfig; -import org.openecomp.aai.util.AAIConstants; -import org.powermock.core.classloader.annotations.PrepareForTest; -import static org.mockito.Mockito.*; import org.powermock.api.mockito.PowerMockito; -import org.powermock.modules.agent.PowerMockAgent; +import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import org.powermock.modules.junit4.rule.PowerMockRule; +@RunWith(PowerMockRunner.class) @PrepareForTest({PhaseInterceptorChain.class, AAIConfig.class}) - public class AAIApiServerURLBaseTest { - @Rule - public PowerMockRule rule = new PowerMockRule(); - - static { - PowerMockAgent.initializeIfNeeded(); - } + + @BeforeClass + public static void configure() { + System.setProperty("AJSC_HOME", "."); + System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local"); + } /** * Test get hostname. * * @throws Exception the exception */ - @Test + @Test public void testGetHostname() throws Exception { PowerMockito.mockStatic(PhaseInterceptorChain.class); Map <String, List<String>> hm = new HashMap<String, List<String>>(); @@ -80,7 +75,7 @@ public class AAIApiServerURLBaseTest { */ @Test public void testGetWithNullHostname() throws Exception { - PowerMockito.mockStatic(AAIConfig.class); + PowerMockito.mockStatic(AAIConfig.class); String defaultHostname = "default-name"; when(AAIConfig.get(AAIConstants.AAI_SERVER_URL_BASE)).thenReturn(defaultHostname); assertEquals(defaultHostname, AAIApiServerURLBase.get()); @@ -294,7 +294,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> - <version>1.10</version> + <version>1.12</version> <configuration> <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> <licenseName>apache_v2</licenseName> |