//------------------------------------------------------------------------- public virtual void test_of_combined() { HolidayCalendar test = HolidayCalendars.of("Thu/Fri+Fri/Sat"); assertEquals(test.Name, "Fri/Sat+Thu/Fri"); assertEquals(test.ToString(), "HolidayCalendar[Fri/Sat+Thu/Fri]"); HolidayCalendar test2 = HolidayCalendars.of("Thu/Fri+Fri/Sat"); assertEquals(test, test2); }
//------------------------------------------------------------------------- public override DayCount lookup(string name) { DayCount value = BY_NAME.get(name); if (value == null) { if (name.regionMatches(true, 0, "Bus/252 ", 0, 8)) { HolidayCalendar cal = HolidayCalendars.of(name.Substring(8)); // load from standard calendars string correctName = "Bus/252 " + cal.Name; DayCount created = new Bus252(correctName, cal); value = BY_NAME.computeIfAbsent(correctName, k => created); BY_NAME.putIfAbsent(correctName.ToUpper(Locale.ENGLISH), created); } } return(value); }
public virtual void test_NO_HOLIDAYS_of() { HolidayCalendar test = HolidayCalendars.of("NoHolidays"); assertEquals(test, HolidayCalendars.NO_HOLIDAYS); }
public virtual void test_THU_FRI_of() { HolidayCalendar test = HolidayCalendars.of("Thu/Fri"); assertEquals(test, HolidayCalendars.THU_FRI); }
public virtual void test_FRI_SAT_of() { HolidayCalendar test = HolidayCalendars.of("Fri/Sat"); assertEquals(test, HolidayCalendars.FRI_SAT); }
public virtual void test_SAT_SUN_of() { HolidayCalendar test = HolidayCalendars.of("Sat/Sun"); assertEquals(test, HolidayCalendars.SAT_SUN); }
public virtual void test_jodaBeans_serialize() { serialize(HolidayCalendars.NO_HOLIDAYS); serialize(HolidayCalendars.SAT_SUN); serialize(HolidayCalendars.of("GBLO")); }