final UserRoleVo roleVo = roleVos.get(0);
assertTrue( "judge".equals(roleVo.getUserRole()) );
//there is only one privilege
assertTrue( null != roleVo.getUserRolePrivileges() && 1 == roleVo.getUserRolePrivileges().size() );
final RolePrivilegeVo rpVo = roleVo.getUserRolePrivileges().get(0);
//the privilege is "projScore" and it has "rw" allowed action
assertTrue( "projScore".equals(rpVo.getUserRolePrivilege()) );
assertTrue( "rw".equals(rpVo.getPrivilegeActions()) );
}
//user role 2 test
{
//the user role is "sponsor"
final UserRoleVo roleVo = roleVos.get(1);
assertTrue( "sponsor".equals(roleVo.getUserRole()) );
//there is only one privilege
assertTrue( null != roleVo.getUserRolePrivileges() && 1 == roleVo.getUserRolePrivileges().size() );
final RolePrivilegeVo rpVo = roleVo.getUserRolePrivileges().get(0);
//the privilege is "projIdea" and it has "r" allowed action
assertTrue( "projIdea".equals(rpVo.getUserRolePrivilege()) );
assertTrue( "r".equals(rpVo.getPrivilegeActions()) );
}
}