Exemplo n.º 1
0
  @Test
  public void exportPatternPlanned() throws IOException {
    List<EmployeeShifts> employeeShifts = context.getEmployeeShifts();
    employeeShifts.addAll(combine(Arrays.asList(td.zamestnanci.get(0), td.zamestnanci.get(1))));
    Planovac planovac = new PatternPlanner(Arrays.asList(td.tyzden40(), td.tyzden32()));
    planovac.naplanuj(employeeShifts, LocalDate.of(2016, 6, 22), LocalDate.of(2016, 7, 30));
    File file = File.createTempFile("testSave", ".xml");
    context.saveTo(file);

    logger.info("Result file:///" + file.getAbsolutePath());
  }
Exemplo n.º 2
0
  // TODO: move somewhere else - this is test of planner
  @Test
  public void testSave() throws Exception {
    List<EmployeeShifts> employeeShifts = context.getEmployeeShifts();
    employeeShifts.addAll(combine(td.zamestnanci));
    Planovac planovac = new ZakladnyPlanovac(td.tyzdennyPlan);
    planovac.naplanuj(employeeShifts, LocalDate.of(2015, 11, 30), LocalDate.of(2015, 12, 6));
    File file = File.createTempFile("testSave", ".xml");
    context.saveTo(file);

    logger.info("Result file:///" + file.getAbsolutePath());
  }