//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(int months, java.time.LocalDate date, java.time.LocalDate expected)
        public virtual void test_adjust(int months, LocalDate date, LocalDate expected)
        {
            TenorAdjustment test = TenorAdjustment.of(Tenor.ofMonths(months), LAST_DAY, BDA_FOLLOW_SAT_SUN);

            assertEquals(test.adjust(date, REF_DATA), expected);
            assertEquals(test.resolve(REF_DATA).adjust(date), expected);
        }
 public virtual void test_of_invalid_conventionForPeriod()
 {
     assertThrowsIllegalArg(() => TenorAdjustment.of(TENOR_1W, LAST_DAY, BDA_NONE));
     assertThrowsIllegalArg(() => TenorAdjustment.of(TENOR_1W, LAST_BUSINESS_DAY, BDA_NONE));
     assertThrowsIllegalArg(() => TenorAdjustment.ofLastDay(TENOR_1W, BDA_NONE));
     assertThrowsIllegalArg(() => TenorAdjustment.ofLastBusinessDay(TENOR_1W, BDA_NONE));
 }
        //-------------------------------------------------------------------------
        public virtual void test_beanBuilder()
        {
            TenorAdjustment test = TenorAdjustment.builder().tenor(TENOR_3M).additionConvention(LAST_DAY).adjustment(BDA_FOLLOW_SAT_SUN).build();

            assertEquals(test.Tenor, TENOR_3M);
            assertEquals(test.AdditionConvention, LAST_DAY);
            assertEquals(test.Adjustment, BDA_FOLLOW_SAT_SUN);
        }
        public virtual void test_ofLastBusinessDay()
        {
            TenorAdjustment test = TenorAdjustment.ofLastBusinessDay(TENOR_3M, BDA_FOLLOW_SAT_SUN);

            assertEquals(test.Tenor, TENOR_3M);
            assertEquals(test.AdditionConvention, LAST_BUSINESS_DAY);
            assertEquals(test.Adjustment, BDA_FOLLOW_SAT_SUN);
            assertEquals(test.ToString(), "3M with LastBusinessDay then apply Following using calendar Sat/Sun");
        }
        //-------------------------------------------------------------------------
        public virtual void test_of_additionConventionNone()
        {
            TenorAdjustment test = TenorAdjustment.of(Tenor.of(Period.of(1, 2, 3)), PAC_NONE, BDA_NONE);

            assertEquals(test.Tenor, Tenor.of(Period.of(1, 2, 3)));
            assertEquals(test.AdditionConvention, PAC_NONE);
            assertEquals(test.Adjustment, BDA_NONE);
            assertEquals(test.ToString(), "1Y2M3D");
        }
        //-------------------------------------------------------------------------
        public virtual void Equals()
        {
            TenorAdjustment a = TenorAdjustment.of(TENOR_3M, LAST_DAY, BDA_FOLLOW_SAT_SUN);
            TenorAdjustment b = TenorAdjustment.of(TENOR_1M, LAST_DAY, BDA_FOLLOW_SAT_SUN);
            TenorAdjustment c = TenorAdjustment.of(TENOR_3M, PAC_NONE, BDA_FOLLOW_SAT_SUN);
            TenorAdjustment d = TenorAdjustment.of(TENOR_3M, LAST_DAY, BDA_NONE);

            assertEquals(a.Equals(b), false);
            assertEquals(a.Equals(c), false);
            assertEquals(a.Equals(d), false);
        }
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         TenorAdjustment other = (TenorAdjustment)obj;
         return(JodaBeanUtils.equal(tenor, other.tenor) && JodaBeanUtils.equal(additionConvention, other.additionConvention) && JodaBeanUtils.equal(adjustment, other.adjustment));
     }
     return(false);
 }
 public virtual void test_serialization()
 {
     assertSerialization(TenorAdjustment.of(TENOR_3M, LAST_DAY, BDA_FOLLOW_SAT_SUN));
 }
 //-------------------------------------------------------------------------
 public virtual void coverage()
 {
     coverImmutableBean(TenorAdjustment.of(TENOR_3M, LAST_DAY, BDA_FOLLOW_SAT_SUN));
 }