]> source.dussan.org Git - archiva.git/commitdiff
add unit test for hasRole
authorOlivier Lamy <olamy@apache.org>
Wed, 16 Jan 2013 15:16:43 +0000 (15:16 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 16 Jan 2013 15:16:43 +0000 (15:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1433978 13f79535-47bb-0310-9956-ffa450edef68

redback-common/redback-common-ldap/src/test/java/org/apache/archiva/redback/common/ldap/role/TestLdapRoleMapper.java

index 8dbe6181191013ebad6704702c047ae4cc6addd7..74feca9aaf2c6e705742bc13988017a3236a11b7 100644 (file)
@@ -362,4 +362,19 @@ public class TestLdapRoleMapper
 
     }
 
+    @Test
+    public void hasRoleFound()
+        throws Exception
+    {
+        assertTrue( ldapRoleMapper.hasRole( getDirContext(), "Internal Repo Observer" ) );
+    }
+
+    @Test
+    public void hasRoleNotFound()
+        throws Exception
+    {
+        assertFalse( ldapRoleMapper.hasRole( getDirContext(), "Australian wine is good but not as French! " ) );
+    }
+
+
 }