Search in sources :

Example 1 with ACHPersonPayeeFixture

use of edu.cornell.kfs.pdp.batch.fixture.ACHPersonPayeeFixture 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

ACHPersonPayeeFixture (edu.cornell.kfs.pdp.batch.fixture.ACHPersonPayeeFixture)1 PersonService (org.kuali.kfs.kim.api.identity.PersonService)1