Beispiel #1
0
        public virtual void test_builder()
        {
            TermDepositTemplate test = TermDepositTemplate.builder().convention(CONVENTION).depositPeriod(DEPOSIT_PERIOD).build();

            assertEquals(test.Convention, CONVENTION);
            assertEquals(test.DepositPeriod, DEPOSIT_PERIOD);
        }
Beispiel #2
0
 public virtual void test_builder_negativePeriod()
 {
     assertThrowsIllegalArg(() => TermDepositTemplate.builder().convention(CONVENTION).depositPeriod(Period.ofMonths(-2)).build());
 }
Beispiel #3
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains a template based on the specified period and convention.
 /// </summary>
 /// <param name="depositPeriod">  the period between the start date and the end date </param>
 /// <param name="convention">  the market convention </param>
 /// <returns> the template </returns>
 public static TermDepositTemplate of(Period depositPeriod, TermDepositConvention convention)
 {
     ArgChecker.notNull(depositPeriod, "depositPeriod");
     ArgChecker.notNull(convention, "convention");
     return(TermDepositTemplate.builder().depositPeriod(depositPeriod).convention(convention).build());
 }