public virtual void test_combineWith_same() { HolidayCalendar @base = new MockHolCal(); HolidayCalendar test = @base.combinedWith(@base); assertSame(test, @base); }
public virtual void test_combineWith_none() { HolidayCalendar @base = new MockHolCal(); HolidayCalendar test = @base.combinedWith(HolidayCalendars.NO_HOLIDAYS); assertSame(test, @base); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "nextSameOrLastInMonth") public void test_nextLastOrSame(java.time.LocalDate date, java.time.LocalDate expectedNext) public virtual void test_nextLastOrSame(LocalDate date, LocalDate expectedNext) { // mock calendar has Sat/Sun plus 16th, 18th and 31st as holidays HolidayCalendar test = new MockHolCal(); assertEquals(test.nextSameOrLastInMonth(date), expectedNext); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { HolidayCalendar base1 = new MockHolCal(); HolidayCalendar base2 = HolidayCalendars.FRI_SAT; HolidayCalendar test = base1.combinedWith(base2); assertEquals(test.ToString(), "HolidayCalendar[Fri/Sat+Mock]"); assertEquals(test.Name, "Fri/Sat+Mock"); assertEquals(test.Equals(base1.combinedWith(base2)), true); assertEquals(test.Equals(ANOTHER_TYPE), false); assertEquals(test.Equals(null), false); assertEquals(test.GetHashCode(), base1.combinedWith(base2).GetHashCode()); assertEquals(test.isHoliday(THU_2014_07_10), false); assertEquals(test.isHoliday(FRI_2014_07_11), true); assertEquals(test.isHoliday(SAT_2014_07_12), true); assertEquals(test.isHoliday(SUN_2014_07_13), true); assertEquals(test.isHoliday(MON_2014_07_14), false); assertEquals(test.isHoliday(TUE_2014_07_15), false); assertEquals(test.isHoliday(WED_2014_07_16), true); assertEquals(test.isHoliday(THU_2014_07_17), false); assertEquals(test.isHoliday(FRI_2014_07_18), true); assertEquals(test.isHoliday(SAT_2014_07_19), true); assertEquals(test.isHoliday(SUN_2014_07_20), true); assertEquals(test.isHoliday(MON_2014_07_21), false); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "shift") public void test_shift(java.time.LocalDate date, int amount, java.time.LocalDate expected) public virtual void test_shift(LocalDate date, int amount, LocalDate expected) { // 16th, 18th, Sat, Sun HolidayCalendar test = new MockHolCal(); assertEquals(test.shift(date, amount), expected); }
public virtual void test_holidays_LocalDateLocalDate_endBeforeStart() { HolidayCalendar test = new MockHolCal(); assertThrows(typeof(System.ArgumentException), () => test.holidays(TUE_2014_07_15, MON_2014_07_14)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "holidays") public void test_holidays_LocalDateLocalDate(java.time.LocalDate start, java.time.LocalDate end, com.google.common.collect.ImmutableList<java.time.LocalDate> expected) public virtual void test_holidays_LocalDateLocalDate(LocalDate start, LocalDate end, ImmutableList <LocalDate> expected) { HolidayCalendar test = new MockHolCal(); assertEquals(test.holidays(start, end).collect(toImmutableList()), expected); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "daysBetween") public void test_daysBetween_LocalDateLocalDate(java.time.LocalDate start, java.time.LocalDate end, int expected) public virtual void test_daysBetween_LocalDateLocalDate(LocalDate start, LocalDate end, int expected) { HolidayCalendar test = new MockHolCal(); assertEquals(test.daysBetween(start, end), expected); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "previousOrSame") public void test_previousOrSame(java.time.LocalDate date, java.time.LocalDate expectedPrevious) public virtual void test_previousOrSame(LocalDate date, LocalDate expectedPrevious) { HolidayCalendar test = new MockHolCal(); assertEquals(test.previousOrSame(date), expectedPrevious); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "nextOrSame") public void test_nextOrSame(java.time.LocalDate date, java.time.LocalDate expectedNext) public virtual void test_nextOrSame(LocalDate date, LocalDate expectedNext) { HolidayCalendar test = new MockHolCal(); assertEquals(test.nextOrSame(date), expectedNext); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "shift") public void test_adjustBy(java.time.LocalDate date, int amount, java.time.LocalDate expected) public virtual void test_adjustBy(LocalDate date, int amount, LocalDate expected) { HolidayCalendar test = new MockHolCal(); assertEquals(date.with(test.adjustBy(amount)), expected); }