Search in sources :

Example 6 with PersonService

use of org.kuali.kfs.kim.api.identity.PersonService in project cu-kfs by CU-CommunityApps.

the class PayeeACHAccountExtractServiceImplTest method createMockPersonService.

private PersonService createMockPersonService() throws Exception {
    PersonService personService = mock(PersonService.class);
    Stream<ACHPersonPayeeFixture> fixtures = Stream.of(ACHPersonPayeeFixture.JOHN_DOE, ACHPersonPayeeFixture.JANE_DOE, ACHPersonPayeeFixture.ROBERT_SMITH, ACHPersonPayeeFixture.MARY_SMITH, ACHPersonPayeeFixture.KFS_SYSTEM_USER);
    fixtures.forEach((fixture) -> {
        when(personService.getPersonByPrincipalName(fixture.principalName)).thenReturn(fixture.toPerson());
    });
    return personService;
}
Also used : ACHPersonPayeeFixture(edu.cornell.kfs.pdp.batch.fixture.ACHPersonPayeeFixture) PersonService(org.kuali.kfs.kim.api.identity.PersonService)

Aggregations

PersonService (org.kuali.kfs.kim.api.identity.PersonService)6 Person (org.kuali.kfs.kim.api.identity.Person)4 HashSet (java.util.HashSet)2 ActionTaken (org.kuali.kfs.kew.actiontaken.ActionTaken)2 ACHPersonPayeeFixture (edu.cornell.kfs.pdp.batch.fixture.ACHPersonPayeeFixture)1 TestAdHocRoutePerson (edu.cornell.kfs.sys.util.MockDocumentUtils.TestAdHocRoutePerson)1 AdHocRoutePerson (org.kuali.kfs.krad.bo.AdHocRoutePerson)1