Search in sources :

Example 1 with HourTypeService

use of com.artezio.arttime.services.HourTypeService in project ART-TIME by Artezio.

the class ReportedHoursIndicatorTest method setUp.

@Before
public void setUp() throws Exception {
    loggedEmployee = new Employee(userName);
    hoursIndicator = createMockBuilder(ReportedHoursIndicator.class).addMockedMethod("getFilter").createMock();
    period = new Period();
    workTimeService = createMock(WorkTimeService.class);
    employeeService = createMock(EmployeeService.class);
    filter = createMock(Filter.class);
    hourTypeService = createMock(HourTypeService.class);
    expect(employeeService.getLoggedEmployee()).andReturn(Optional.of(loggedEmployee)).anyTimes();
    replay(employeeService);
    setField(hoursIndicator, "workTimeService", workTimeService);
    setField(hoursIndicator, "employeeService", employeeService);
    setField(hoursIndicator, "hourTypeService", hourTypeService);
}
Also used : Employee(com.artezio.arttime.datamodel.Employee) WorkTimeService(com.artezio.arttime.services.WorkTimeService) Filter(com.artezio.arttime.filter.Filter) HourTypeService(com.artezio.arttime.services.HourTypeService) Period(com.artezio.arttime.datamodel.Period) EmployeeService(com.artezio.arttime.services.EmployeeService) Before(org.junit.Before)

Aggregations

Employee (com.artezio.arttime.datamodel.Employee)1 Period (com.artezio.arttime.datamodel.Period)1 Filter (com.artezio.arttime.filter.Filter)1 EmployeeService (com.artezio.arttime.services.EmployeeService)1 HourTypeService (com.artezio.arttime.services.HourTypeService)1 WorkTimeService (com.artezio.arttime.services.WorkTimeService)1 Before (org.junit.Before)1