I have this method that I want to test it with JUnit. It converts String into LocalDate.
public static LocalDate convertDate(String aDate) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MMM-yyyy");
LocalDate localDate = LocalDate.parse(aDate, formatter);
return localDate;
}
Aucun commentaire:
Enregistrer un commentaire