use of com.objectcomputing.checkins.services.employee_hours.EmployeeHoursServices in project check-ins by objectcomputing.
the class EmployeeHoursFixture method createEmployeeHours.
default List<EmployeeHours> createEmployeeHours() {
final EmployeeHoursServices employeeHoursServices = null;
File file = new File("src/test/java/com/objectcomputing/checkins/services/employee_hours/test.csv");
MultipartBody multipartBody = MultipartBody.builder().addPart("file", "test.csv", new MediaType("text/csv"), file).build();
List<EmployeeHours> employeeHoursList = new ArrayList<>();
try {
InputStream inputStream = new FileInputStream(file);
employeeHoursList = EmployeeaHoursCSVHelper.employeeHrsCsv(inputStream);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return getEmployeeHoursRepository().saveAll(employeeHoursList);
}
Aggregations