aboutsummaryrefslogtreecommitdiffstats
path: root/sliapi/springboot/src/test
diff options
context:
space:
mode:
authorDavid Stilwell <stilwelld@att.com>2020-03-18 10:02:50 -0400
committerDan Timoney <dtimoney@att.com>2020-03-19 16:14:31 -0400
commit35d9348ab67b6dc3c8e90a2a479f75fcd0af9228 (patch)
tree537ade8be9a327c2b26a96a7ac79dd12a8bac9a9 /sliapi/springboot/src/test
parentd8bda45b7e8feccaa521d0ae35b72ae3b87c5a89 (diff)
Springboot integration with AAF
Changes made: pom.xml updates, App.java add Beans for realm and filterchain Issue-ID: CCSDK-2178 Change-Id: I29aa242ceff6a2f840b93a8d18ca5385190ca6d2 Signed-off-by: David Stilwell <stilwelld@att.com>
Diffstat (limited to 'sliapi/springboot/src/test')
-rw-r--r--sliapi/springboot/src/test/java/org/onap/ccsdk/sli/core/sliapi/springboot/AppTest.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/sliapi/springboot/src/test/java/org/onap/ccsdk/sli/core/sliapi/springboot/AppTest.java b/sliapi/springboot/src/test/java/org/onap/ccsdk/sli/core/sliapi/springboot/AppTest.java
new file mode 100644
index 00000000..c5f452cb
--- /dev/null
+++ b/sliapi/springboot/src/test/java/org/onap/ccsdk/sli/core/sliapi/springboot/AppTest.java
@@ -0,0 +1,39 @@
+package org.onap.ccsdk.sli.core.sliapi.springboot;
+
+import org.apache.shiro.realm.Realm;
+import org.apache.shiro.realm.text.PropertiesRealm;
+import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.aaf.cadi.shiro.AAFRealm;
+
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+public class AppTest {
+
+ App app;
+
+ @Before
+ public void setUp() throws Exception {
+ app = new App();
+ }
+
+ @Test
+ public void realm() {
+ Realm realm = app.realm();
+ assertTrue(realm instanceof PropertiesRealm);
+
+
+ }
+
+ @Test
+ public void shiroFilterChainDefinition() {
+ ShiroFilterChainDefinition chainDefinition = app.shiroFilterChainDefinition();
+ Map<String, String> chainMap = chainDefinition.getFilterChainMap();
+ assertEquals("anon", chainMap.get("/**"));
+
+
+ }
+} \ No newline at end of file