aboutsummaryrefslogtreecommitdiffstats
path: root/ajsc-aai/src/test/java
diff options
context:
space:
mode:
authorMax Benjamin <mb388a@att.com>2017-02-20 11:59:22 -0500
committerMax Benjamin <mb388a@att.com>2017-02-20 11:59:22 -0500
commite909dbdc4a1bc92858c147d14fe69b659f6f51e0 (patch)
tree10675b8674dda0f65e5bada243b98fdbb3bd6c3d /ajsc-aai/src/test/java
parent110cfb07d469260d73d88b73641972afa7e48eed (diff)
removed vestigial testing code
Change-Id: I03028173ca3bb996bf7d7afba348a5137d1dbd8a Signed-off-by: Max Benjamin <mb388a@att.com>
Diffstat (limited to 'ajsc-aai/src/test/java')
-rw-r--r--ajsc-aai/src/test/java/org/openecomp/aai/util/AAIApiServerURLBaseTest.java31
1 files changed, 13 insertions, 18 deletions
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());