private static IDictionary <CurveName, LoadedCurveSettings> parseCurveSettings(CharSource settingsResource)
        {
            ImmutableMap.Builder <CurveName, LoadedCurveSettings> builder = ImmutableMap.builder();
            CsvFile csv = CsvFile.of(settingsResource, true);

            foreach (CsvRow row in csv.rows())
            {
                string curveNameStr         = row.getField(SETTINGS_CURVE_NAME);
                string valueTypeStr         = row.getField(SETTINGS_VALUE_TYPE);
                string dayCountStr          = row.getField(SETTINGS_DAY_COUNT);
                string interpolatorStr      = row.getField(SETTINGS_INTERPOLATOR);
                string leftExtrapolatorStr  = row.getField(SETTINGS_LEFT_EXTRAPOLATOR);
                string rightExtrapolatorStr = row.getField(SETTINGS_RIGHT_EXTRAPOLATOR);

                if (!VALUE_TYPE_MAP.containsKey(valueTypeStr.ToLower(Locale.ENGLISH)))
                {
                    throw new System.ArgumentException(Messages.format("Unsupported {} in curve settings: {}", SETTINGS_VALUE_TYPE, valueTypeStr));
                }

                CurveName         curveName    = CurveName.of(curveNameStr);
                ValueType         valueType    = VALUE_TYPE_MAP.get(valueTypeStr.ToLower(Locale.ENGLISH));
                CurveInterpolator interpolator = CurveInterpolator.of(interpolatorStr);
                CurveExtrapolator leftExtrap   = CurveExtrapolator.of(leftExtrapolatorStr);
                CurveExtrapolator rightExtrap  = CurveExtrapolator.of(rightExtrapolatorStr);
                // ONE_ONE day count is not used
                DayCount            dayCount = LoaderUtils.parseDayCount(dayCountStr);
                LoadedCurveSettings settings = LoadedCurveSettings.of(curveName, ValueType.YEAR_FRACTION, valueType, dayCount, interpolator, leftExtrap, rightExtrap);
                builder.put(curveName, settings);
            }
            return(builder.build());
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            coverPrivateConstructor(typeof(RatesCurvesCsvLoader));
            LoadedCurveKey.meta();
            coverImmutableBean(LoadedCurveKey.of(CURVE_DATE, CurveName.of("Test")));
            LoadedCurveNode.meta();
            coverImmutableBean(LoadedCurveNode.of(CURVE_DATE, 1d, "Test"));
            LoadedCurveSettings.meta();
            LoadedCurveSettings settings1 = LoadedCurveSettings.of(CurveName.of("Test"), ValueType.YEAR_FRACTION, ValueType.ZERO_RATE, DayCounts.ACT_365F, CurveInterpolators.LINEAR, CurveExtrapolators.FLAT, CurveExtrapolators.FLAT);
            LoadedCurveSettings settings2 = LoadedCurveSettings.of(CurveName.of("Test2"), ValueType.YEAR_FRACTION, ValueType.DISCOUNT_FACTOR, DayCounts.ACT_ACT_ISDA, CurveInterpolators.LOG_LINEAR, CurveExtrapolators.LINEAR, CurveExtrapolators.LINEAR);

            coverImmutableBean(settings1);
            coverBeanEquals(settings1, settings2);
        }