diff options
Diffstat (limited to 'aai-core/src/test/java/org/onap/aai/auth/AAIUserTest.java')
-rw-r--r-- | aai-core/src/test/java/org/onap/aai/auth/AAIUserTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/auth/AAIUserTest.java b/aai-core/src/test/java/org/onap/aai/auth/AAIUserTest.java index a90c7feb..cf5eafbd 100644 --- a/aai-core/src/test/java/org/onap/aai/auth/AAIUserTest.java +++ b/aai-core/src/test/java/org/onap/aai/auth/AAIUserTest.java @@ -17,13 +17,14 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.auth; +import static org.junit.Assert.assertEquals; + import org.junit.Test; import org.onap.aai.AAISetup; -import static org.junit.Assert.assertEquals; - public class AAIUserTest extends AAISetup { @Test @@ -33,19 +34,19 @@ public class AAIUserTest extends AAISetup { usr.setUserAccess("auth", "GET"); usr.setUserAccess("auth", "PUT"); usr.setUserAccess("authentication", "PUT", "GET", "POST"); - + assertEquals(true, usr.hasAccess("auth", "GET")); assertEquals(true, usr.hasAccess("auth", "PUT")); assertEquals(true, usr.hasAccess("authentication", "POST")); } - + @Test public void testIsNotAuth() { AAIUser usr = new AAIUser("testUser"); usr.addRole("testRole"); - + assertEquals(false, usr.hasAccess("auth", "GET")); - + usr.setUserAccess("auth", "GET"); assertEquals(false, usr.hasAccess("auth", "PUT")); } |