//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)
        {
            PeriodAdjustment test = PeriodAdjustment.of(Period.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_NONE()
        {
            PeriodAdjustment test = PeriodAdjustment.NONE;

            assertEquals(test.Period, Period.ZERO);
            assertEquals(test.Adjustment, BDA_NONE);
            assertEquals(test.ToString(), "P0D");
        }
        //-------------------------------------------------------------------------
        public virtual void test_beanBuilder()
        {
            PeriodAdjustment test = PeriodAdjustment.builder().period(Period.ofMonths(3)).additionConvention(LAST_DAY).adjustment(BDA_FOLLOW_SAT_SUN).build();

            assertEquals(test.Period, Period.ofMonths(3));
            assertEquals(test.AdditionConvention, LAST_DAY);
            assertEquals(test.Adjustment, BDA_FOLLOW_SAT_SUN);
        }
        public virtual void test_of_invalid_conventionForPeriod()
        {
            Period period = Period.of(1, 2, 3);

            assertThrowsIllegalArg(() => PeriodAdjustment.of(period, LAST_DAY, BDA_NONE));
            assertThrowsIllegalArg(() => PeriodAdjustment.of(period, LAST_BUSINESS_DAY, BDA_NONE));
            assertThrowsIllegalArg(() => PeriodAdjustment.ofLastDay(period, BDA_NONE));
            assertThrowsIllegalArg(() => PeriodAdjustment.ofLastBusinessDay(period, BDA_NONE));
        }
        public virtual void test_ofLastBusinessDay()
        {
            PeriodAdjustment test = PeriodAdjustment.ofLastBusinessDay(Period.ofMonths(3), BDA_FOLLOW_SAT_SUN);

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

            assertEquals(test.Period, Period.of(1, 2, 3));
            assertEquals(test.AdditionConvention, PAC_NONE);
            assertEquals(test.Adjustment, BDA_NONE);
            assertEquals(test.ToString(), "P1Y2M3D");
        }
        //-------------------------------------------------------------------------
        public virtual void Equals()
        {
            PeriodAdjustment a = PeriodAdjustment.of(Period.ofMonths(3), LAST_DAY, BDA_FOLLOW_SAT_SUN);
            PeriodAdjustment b = PeriodAdjustment.of(Period.ofMonths(1), LAST_DAY, BDA_FOLLOW_SAT_SUN);
            PeriodAdjustment c = PeriodAdjustment.of(Period.ofMonths(3), PAC_NONE, BDA_FOLLOW_SAT_SUN);
            PeriodAdjustment d = PeriodAdjustment.of(Period.ofMonths(3), 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())
     {
         PeriodAdjustment other = (PeriodAdjustment)obj;
         return(JodaBeanUtils.equal(period, other.period) && JodaBeanUtils.equal(additionConvention, other.additionConvention) && JodaBeanUtils.equal(adjustment, other.adjustment));
     }
     return(false);
 }
 public virtual void test_serialization()
 {
     assertSerialization(PeriodAdjustment.of(Period.ofMonths(3), LAST_DAY, BDA_FOLLOW_SAT_SUN));
 }
 //-------------------------------------------------------------------------
 public virtual void coverage()
 {
     coverImmutableBean(PeriodAdjustment.of(Period.ofMonths(3), LAST_DAY, BDA_FOLLOW_SAT_SUN));
 }