//------------------------------------------------------------------------- public virtual void test_ofDayOfWeek() { foreach (DayOfWeek dow in DayOfWeek.values()) { RollConvention test = RollConvention.ofDayOfWeek(dow); assertEquals(test.Name, "Day" + CaseFormat.UPPER_UNDERSCORE.converterTo(CaseFormat.UPPER_CAMEL).convert(dow.ToString()).substring(0, 3)); assertEquals(test.ToString(), "Day" + CaseFormat.UPPER_UNDERSCORE.converterTo(CaseFormat.UPPER_CAMEL).convert(dow.ToString()).substring(0, 3)); assertSame(RollConvention.of(test.Name), test); assertSame(RollConvention.of("DAY" + dow.ToString().Substring(0, 3)), test); } }
//------------------------------------------------------------------------- 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 = "name") public void test_toString(RollConvention convention, String name) public virtual void test_toString(RollConvention convention, string name) { assertEquals(convention.ToString(), name); }