@Test public void testGetMailPeriod() { for (final Period period : Period.values()) { assertNotNull("getMailCode", period.getMailCode()); assertEquals("valueOfByMailCode", period, Period.valueOfByMailCode(period.getMailCode())); } try { Period.valueOfByMailCode("unknown"); } catch (final IllegalArgumentException e) { assertNotNull("ok", e); } assertEquals("getMailPeriods", Collections.singletonList(Period.SEMAINE), MailReport.getMailPeriods()); setProperty(Parameter.MAIL_PERIODS, Period.JOUR.getMailCode()); assertEquals("getMailPeriods", Collections.singletonList(Period.JOUR), MailReport.getMailPeriods()); }
public static List<Period> getMailPeriods() { final List<Period> mailPeriods; if (Parameter.MAIL_PERIODS.getValue() == null) { mailPeriods = Collections.singletonList(Period.SEMAINE); } else { final String mailPeriodsParameter = Parameter.MAIL_PERIODS.getValue(); mailPeriods = new ArrayList<Period>(); for (final String mailPeriod : mailPeriodsParameter.split(",")) { mailPeriods.add(Period.valueOfByMailCode(mailPeriod)); } } return mailPeriods; }
MailReport { public static List<Period> getMailPeriods() { final List<Period> mailPeriods; if (Parameter.MAIL_PERIODS.getValue() == null) { mailPeriods = Collections.singletonList(Period.SEMAINE); } else { final String mailPeriodsParameter = Parameter.MAIL_PERIODS.getValue(); mailPeriods = new ArrayList<Period>(); for (final String mailPeriod : mailPeriodsParameter.split(",")) { mailPeriods.add(Period.valueOfByMailCode(mailPeriod)); } } return mailPeriods; } }
MailReport { public static List<Period> getMailPeriods() { final List<Period> mailPeriods; if (Parameter.MAIL_PERIODS.getValue() == null) { mailPeriods = Collections.singletonList(Period.SEMAINE); } else { final String mailPeriodsParameter = Parameter.MAIL_PERIODS.getValue(); mailPeriods = new ArrayList<Period>(); for (final String mailPeriod : mailPeriodsParameter.split(",")) { mailPeriods.add(Period.valueOfByMailCode(mailPeriod)); } } return mailPeriods; }  }
MailReport { public static List<Period> getMailPeriods() { final List<Period> mailPeriods; if (Parameter.MAIL_PERIODS.getValue() == null) { mailPeriods = Collections.singletonList(Period.SEMAINE); } else { final String mailPeriodsParameter = Parameter.MAIL_PERIODS.getValue(); mailPeriods = new ArrayList<Period>(); for (final String mailPeriod : mailPeriodsParameter.split(",")) { mailPeriods.add(Period.valueOfByMailCode(mailPeriod)); } } return mailPeriods; }  static void scheduleReportMailForLocalServer(Collector collector, Timer timer); static List<Period> getMailPeriods(); static Date getNextExecutionDate(Period period); void sendReportMailForLocalServer(Collector collector, Period period); void sendReportMail(Collector collector, boolean collectorServer,
			List<JavaInformations> javaInformationsList, Period period); }
MailReport { public static List<Period> getMailPeriods() { final List<Period> mailPeriods; if (Parameter.MAIL_PERIODS.getValue() == null) { mailPeriods = Collections.singletonList(Period.SEMAINE); } else { final String mailPeriodsParameter = Parameter.MAIL_PERIODS.getValue(); mailPeriods = new ArrayList<Period>(); for (final String mailPeriod : mailPeriodsParameter.split(",")) { mailPeriods.add(Period.valueOfByMailCode(mailPeriod)); } } return mailPeriods; }  static void scheduleReportMailForLocalServer(Collector collector, Timer timer); static List<Period> getMailPeriods(); static Date getNextExecutionDate(Period period); void sendReportMailForLocalServer(Collector collector, Period period); void sendReportMail(Collector collector, boolean collectorServer,
			List<JavaInformations> javaInformationsList, Period period);  }