Search in sources :

Example 1 with ComplexStubPersonAttributeDao

use of org.jasig.services.persondir.support.ComplexStubPersonAttributeDao in project uPortal by Jasig.

the class PersonDirNameFinderTest method setUp.

protected void setUp() throws Exception {
    super.setUp();
    Map<String, List<Object>> userWithDisplayNameAttributes = new HashMap<String, List<Object>>();
    userWithDisplayNameAttributes.put("phone", Arrays.asList((Object) "777-7777"));
    userWithDisplayNameAttributes.put("displayName", Arrays.asList((Object) "Display Name"));
    Map<String, List<Object>> userWithEmptyDisplayNameAttributes = new HashMap<String, List<Object>>();
    userWithEmptyDisplayNameAttributes.put("phone", Arrays.asList((Object) "888-8888"));
    userWithEmptyDisplayNameAttributes.put("displayName", Arrays.asList((Object) ""));
    Map<String, List<Object>> userWithoutDisplayNameAttributes = new HashMap<String, List<Object>>();
    userWithoutDisplayNameAttributes.put("phone", Arrays.asList((Object) "666-6666"));
    userWithoutDisplayNameAttributes.put("givenName", Arrays.asList((Object) "Howard"));
    Map<String, Map<String, List<Object>>> daoBackingMap = new HashMap<String, Map<String, List<Object>>>();
    daoBackingMap.put("userWithDisplayName", userWithDisplayNameAttributes);
    daoBackingMap.put("userWithEmptyDisplayName", userWithEmptyDisplayNameAttributes);
    daoBackingMap.put("userWithoutDisplayName", userWithoutDisplayNameAttributes);
    IPersonAttributeDao paDao = new ComplexStubPersonAttributeDao(daoBackingMap);
    this.finder = new PersonDirNameFinder(paDao);
}
Also used : HashMap(java.util.HashMap) IPersonAttributeDao(org.jasig.services.persondir.IPersonAttributeDao) List(java.util.List) Map(java.util.Map) HashMap(java.util.HashMap) ComplexStubPersonAttributeDao(org.jasig.services.persondir.support.ComplexStubPersonAttributeDao)

Aggregations

HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 IPersonAttributeDao (org.jasig.services.persondir.IPersonAttributeDao)1 ComplexStubPersonAttributeDao (org.jasig.services.persondir.support.ComplexStubPersonAttributeDao)1