/** * Loads one or more CSV format FX rate files. * <p> * All dates that are found will be returned. * <p> * If the files contain a duplicate entry an exception will be thrown. * * @param resources the CSV resources * @return the loaded FX rates, mapped by {@link LocalDate} and {@linkplain FxRateId rate ID} * @throws IllegalArgumentException if the files contain a duplicate entry */ public static ImmutableMap<LocalDate, ImmutableMap<FxRateId, FxRate>> loadAllDates(ResourceLocator... resources) { return loadAllDates(Arrays.asList(resources)); }
public void test_load_alLDates_file1_date1() { Map<LocalDate, ImmutableMap<FxRateId, FxRate>> map = FxRatesCsvLoader.loadAllDates(RATES_1); assertEquals(map.size(), 2); assertFile1Date1(map.get(DATE1)); assertFile1Date2(map.get(DATE2)); }