add unit test for hasRole

git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1433978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-16 15:16:43 +00:00
parent 1222b2b217
commit 0b09f58b18
1 changed files with 15 additions and 0 deletions

View 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! " ) );
}
} }