//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @DataProvider(name = "types") public static Object[][] data_types() public static object[][] data_types() { StubConvention[] conv = StubConvention.values(); object[][] result = new object[conv.Length][]; for (int i = 0; i < conv.Length; i++) { result[i] = new object[] { conv[i] }; } return(result); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "isStubLong") public void test_isStubLong(StubConvention conv, java.time.LocalDate date1, java.time.LocalDate date2, System.Nullable<bool> expected) public virtual void test_isStubLong(StubConvention conv, LocalDate date1, LocalDate date2, bool?expected) { if (expected == null) { assertThrowsIllegalArg(() => conv.isStubLong(date1, date2)); } else { assertEquals(conv.isStubLong(date1, date2), expected.Value); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "implicit") public void test_toImplicit(StubConvention conv, boolean initialStub, boolean finalStub, StubConvention expected) public virtual void test_toImplicit(StubConvention conv, bool initialStub, bool finalStub, StubConvention expected) { if (expected == null) { assertThrowsIllegalArg(() => conv.toImplicit(null, initialStub, finalStub)); } else { assertEquals(conv.toImplicit(null, initialStub, finalStub), expected); } }
//------------------------------------------------------------------------- /// <summary> /// Creates a sub-schedule within this period. /// <para> /// The sub-schedule will have the one or more periods. /// The schedule is bounded by the unadjusted start and end date of this period. /// The frequency and roll convention are used to build unadjusted schedule dates. /// The stub convention is used to handle any remaining time when the new frequency /// does not evenly divide into the period. /// /// </para> /// </summary> /// <param name="frequency"> the frequency of the sub-schedule </param> /// <param name="rollConvention"> the roll convention to use for rolling </param> /// <param name="stubConvention"> the stub convention to use for any excess </param> /// <param name="adjustment"> the business day adjustment to apply to the sub-schedule </param> /// <returns> the sub-schedule </returns> /// <exception cref="ScheduleException"> if the schedule cannot be created </exception> public PeriodicSchedule subSchedule(Frequency frequency, RollConvention rollConvention, StubConvention stubConvention, BusinessDayAdjustment adjustment) { return(PeriodicSchedule.builder().startDate(unadjustedStartDate).endDate(unadjustedEndDate).frequency(frequency).businessDayAdjustment(adjustment).rollConvention(rollConvention).stubConvention(stubConvention).build()); }
//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(StubConvention type) public virtual void test_null(StubConvention type) { assertThrowsIllegalArg(() => type.toRollConvention(null, date(2014, JULY, 1), Frequency.P3M, true)); assertThrowsIllegalArg(() => type.toRollConvention(date(2014, JULY, 1), null, Frequency.P3M, true)); assertThrowsIllegalArg(() => type.toRollConvention(date(2014, JULY, 1), date(2014, OCTOBER, 1), null, true)); }
public virtual void test_of_lookup_null() { assertThrowsIllegalArg(() => StubConvention.of(null)); }
public virtual void test_of_lookup_notFound() { assertThrowsIllegalArg(() => StubConvention.of("Rubbish")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookupLowerCase(StubConvention convention, String name) public virtual void test_of_lookupLowerCase(StubConvention convention, string name) { assertEquals(StubConvention.of(name.ToLower(Locale.ENGLISH)), convention); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookup(StubConvention convention, String name) public virtual void test_of_lookup(StubConvention convention, string name) { assertEquals(StubConvention.of(name), convention); }
//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(StubConvention convention, String name) public virtual void test_toString(StubConvention convention, string name) { assertEquals(convention.ToString(), name); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "roll") public void test_toRollConvention(StubConvention conv, java.time.LocalDate start, java.time.LocalDate end, Frequency freq, boolean eom, RollConvention expected) public virtual void test_toRollConvention(StubConvention conv, LocalDate start, LocalDate end, Frequency freq, bool eom, RollConvention expected) { assertEquals(conv.toRollConvention(start, end, freq, eom), expected); }