Exemple #1
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ImmutableOvernightIndex index = ImmutableOvernightIndex.builder().name("Test").currency(Currency.GBP).fixingCalendar(GBLO).publicationDateOffset(0).effectiveDateOffset(0).dayCount(ACT_360).build();

            coverImmutableBean(index);
            coverPrivateConstructor(typeof(OvernightIndices));
        }
Exemple #2
0
        //-------------------------------------------------------------------------
        public virtual void test_equals()
        {
            ImmutableOvernightIndex a = ImmutableOvernightIndex.builder().name("Test").currency(Currency.GBP).fixingCalendar(GBLO).publicationDateOffset(0).effectiveDateOffset(0).dayCount(ACT_360).build();
            OvernightIndex          b = a.toBuilder().name("Rubbish").build();

            assertEquals(a.Equals(b), false);
        }
Exemple #3
0
        private static OvernightIndex parseOvernightIndex(CsvRow row)
        {
            string            name      = row.getValue(NAME_FIELD);
            Currency          currency  = Currency.parse(row.getValue(CURRENCY_FIELD));
            bool              active    = bool.Parse(row.getValue(ACTIVE_FIELD));
            DayCount          dayCount  = DayCount.of(row.getValue(DAY_COUNT_FIELD));
            HolidayCalendarId fixingCal = HolidayCalendarId.of(row.getValue(FIXING_CALENDAR_FIELD));
            int      publicationDays    = int.Parse(row.getValue(PUBLICATION_DAYS_FIELD));
            int      effectiveDays      = int.Parse(row.getValue(EFFECTIVE_DAYS_FIELD));
            DayCount fixedLegDayCount   = DayCount.of(row.getValue(FIXED_LEG_DAY_COUNT));

            // build result
            return(ImmutableOvernightIndex.builder().name(name).currency(currency).active(active).dayCount(dayCount).fixingCalendar(fixingCal).publicationDateOffset(publicationDays).effectiveDateOffset(effectiveDays).defaultFixedLegDayCount(fixedLegDayCount).build());
        }
Exemple #4
0
        public virtual void test_serialization()
        {
            OvernightIndex index = ImmutableOvernightIndex.builder().name("Test").currency(Currency.GBP).fixingCalendar(GBLO).publicationDateOffset(0).effectiveDateOffset(0).dayCount(ACT_360).build();

            assertSerialization(index);
        }