use of com.artezio.arttime.services.repositories.EmployeeRepository in project ART-TIME by Artezio.
the class ManageProjectPermissionFilterTest method testGetEmployeeRepository_ifNull.
@Test
public void testGetEmployeeRepository_ifNull() throws NoSuchFieldException {
setField(filter, "employeeRepository", null);
PowerMock.mockStatic(CDIUtils.class);
expect(CDIUtils.getBean(EmployeeRepository.class)).andReturn(employeeRepository);
PowerMock.replayAll(CDIUtils.class);
EmployeeRepository actual = filter.getEmployeeRepository();
PowerMock.verifyAll();
assertNotNull(actual);
assertSame(employeeRepository, actual);
}
use of com.artezio.arttime.services.repositories.EmployeeRepository in project ART-TIME by Artezio.
the class ManageProjectPermissionFilterTest method testGetEmployeeRepository_ifNotNull.
@Test
public void testGetEmployeeRepository_ifNotNull() throws NoSuchFieldException {
setField(filter, "employeeRepository", employeeRepository);
EmployeeRepository actual = filter.getEmployeeRepository();
assertNotNull(actual);
assertSame(employeeRepository, actual);
}
Aggregations