public virtual void test_ofDayOfWeek_adjust() { foreach (DayOfWeek dow in DayOfWeek.values()) { RollConvention test = RollConvention.ofDayOfWeek(dow); assertEquals(test.adjust(date(2014, AUGUST, 14)), date(2014, AUGUST, 14).with(TemporalAdjusters.nextOrSame(dow))); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "types") public void test_null(RollConvention type) public virtual void test_null(RollConvention type) { assertThrowsIllegalArg(() => type.adjust(null)); assertThrowsIllegalArg(() => type.matches(null)); assertThrowsIllegalArg(() => type.next(date(2014, JULY, 1), null)); assertThrowsIllegalArg(() => type.next(null, P3M)); assertThrowsIllegalArg(() => type.previous(date(2014, JULY, 1), null)); assertThrowsIllegalArg(() => type.previous(null, P3M)); }
//------------------------------------------------------------------------- public virtual void test_ofDayOfMonth() { for (int i = 1; i < 30; i++) { RollConvention test = RollConvention.ofDayOfMonth(i); assertEquals(test.adjust(date(2014, JULY, 1)), date(2014, JULY, i)); assertEquals(test.Name, "Day" + i); assertEquals(test.ToString(), "Day" + i); assertSame(RollConvention.of(test.Name), test); assertSame(RollConvention.of("DAY" + i), test); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "adjust") public void test_adjust(RollConvention conv, java.time.LocalDate input, java.time.LocalDate expected) public virtual void test_adjust(RollConvention conv, LocalDate input, LocalDate expected) { assertEquals(conv.adjust(input), expected); }