summaryrefslogtreecommitdiffstats
path: root/aai-aaf-auth/src/test
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-07 08:35:37 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-07 08:38:19 +0000
commitfbb02159b84435cf37221ae8ae5e0045167be15a (patch)
tree78196f6a3e5e4d0b1e5ca6ecadec0f9e9a623303 /aai-aaf-auth/src/test
parent58f0fd2f6ef58de52e1f9a73540c1bb895c0d6e6 (diff)
Reduce the number of problems in aai-common by removing unused imports
- run mvn spotless:apply across aai-commmon to remove unused imports - run mvn formatter:format across aai-common Issue-ID: AAI-3583 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I2dfeb395eafa2824ce8369bba3a18db3e1845522
Diffstat (limited to 'aai-aaf-auth/src/test')
-rw-r--r--aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIAuthCoreTest.java8
-rw-r--r--aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAISetup.java3
-rw-r--r--aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIUserTest.java4
-rw-r--r--aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AafRequestWrapperTest.java20
-rw-r--r--aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/CertUtilTest.java10
-rw-r--r--aai-aaf-auth/src/test/java/org/onap/aai/aaf/filters/CadiPropsTest.java18
6 files changed, 29 insertions, 34 deletions
diff --git a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIAuthCoreTest.java b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIAuthCoreTest.java
index 6fca4fdb..813e8fa1 100644
--- a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIAuthCoreTest.java
+++ b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIAuthCoreTest.java
@@ -20,14 +20,14 @@
package org.onap.aai.aaf.auth;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.aai.aaf.auth.exceptions.AAIUnrecognizedFunctionException;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.aai.aaf.auth.exceptions.AAIUnrecognizedFunctionException;
+
public class AAIAuthCoreTest extends AAISetup {
private AAIAuthCore authCore;
diff --git a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAISetup.java b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAISetup.java
index 0827782e..3284d7a1 100644
--- a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAISetup.java
+++ b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAISetup.java
@@ -17,6 +17,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.aai.aaf.auth;
import org.junit.BeforeClass;
@@ -24,7 +25,7 @@ import org.junit.BeforeClass;
public class AAISetup {
@BeforeClass
- public static void preSetup(){
+ public static void preSetup() {
System.setProperty("AJSC_HOME", ".");
System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local");
}
diff --git a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIUserTest.java b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIUserTest.java
index e3b79cb7..5f02f1aa 100644
--- a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIUserTest.java
+++ b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AAIUserTest.java
@@ -20,10 +20,10 @@
package org.onap.aai.aaf.auth;
-import org.junit.Test;
-
import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
public class AAIUserTest extends AAISetup {
@Test
diff --git a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AafRequestWrapperTest.java b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AafRequestWrapperTest.java
index ebc72e23..46389d02 100644
--- a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AafRequestWrapperTest.java
+++ b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/AafRequestWrapperTest.java
@@ -35,28 +35,26 @@
*
*
*/
-package org.onap.aai.aaf.auth;
-
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import javax.servlet.http.HttpServletRequest;
+package org.onap.aai.aaf.auth;
import static org.easymock.EasyMock.*;
import static org.junit.Assert.assertEquals;
-public class AafRequestWrapperTest {
+import javax.servlet.http.HttpServletRequest;
+import org.junit.Test;
+public class AafRequestWrapperTest {
@Test
- public void testGetHeader(){
+ public void testGetHeader() {
HttpServletRequest mockRequest = createMock(HttpServletRequest.class);
expect(mockRequest.getHeader(CertUtil.AAI_SSL_CLIENT_OU_HDR)).andReturn("m55555@org.onap.com:TEST").times(1, 4);
replay(mockRequest);
- AafRequestWrapper af= new AafRequestWrapper(mockRequest);
- assertEquals(af.getHeader("X-AAI-SSL-Client-OU"),"m55555@org.onap.com:TEST");
- af.putHeader("X-AAI-SSL-Client-C","test@org.onap.com:test");
- assertEquals(af.getHeader("X-AAI-SSL-Client-C"),"test@org.onap.com:test");
+ AafRequestWrapper af = new AafRequestWrapper(mockRequest);
+ assertEquals(af.getHeader("X-AAI-SSL-Client-OU"), "m55555@org.onap.com:TEST");
+ af.putHeader("X-AAI-SSL-Client-C", "test@org.onap.com:test");
+ assertEquals(af.getHeader("X-AAI-SSL-Client-C"), "test@org.onap.com:test");
}
}
diff --git a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/CertUtilTest.java b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/CertUtilTest.java
index 9f307ac2..81a9c1b6 100644
--- a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/CertUtilTest.java
+++ b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/auth/CertUtilTest.java
@@ -20,18 +20,18 @@
package org.onap.aai.aaf.auth;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.assertTrue;
-import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.Properties;
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.assertTrue;
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
/**
* The Class CertUtilTest
diff --git a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/filters/CadiPropsTest.java b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/filters/CadiPropsTest.java
index c3973b1b..601b8292 100644
--- a/aai-aaf-auth/src/test/java/org/onap/aai/aaf/filters/CadiPropsTest.java
+++ b/aai-aaf-auth/src/test/java/org/onap/aai/aaf/filters/CadiPropsTest.java
@@ -35,26 +35,22 @@
*
*
*/
-package org.onap.aai.aaf.filters;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.onap.aai.exceptions.AAIException;
-import org.onap.aai.util.AAIConfig;
-import org.springframework.beans.factory.annotation.Autowired;
-import java.io.IOException;
+package org.onap.aai.aaf.filters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
public class CadiPropsTest {
@Autowired
- CadiProps ca =new CadiProps("src/test/resources/bundleconfig-local/aaf/org.onap.aai.props");
+ CadiProps ca = new CadiProps("src/test/resources/bundleconfig-local/aaf/org.onap.aai.props");
@Test
- public void testGetCadiFileName(){
- assertEquals(ca.getCadiFileName(),"src/test/resources/bundleconfig-local/aaf/org.onap.aai.props");
+ public void testGetCadiFileName() {
+ assertEquals(ca.getCadiFileName(), "src/test/resources/bundleconfig-local/aaf/org.onap.aai.props");
assertNotNull(ca.getCadiProperties());
}
}