public virtual void test_builder()
        {
            ImmutableFixedInflationSwapConvention test = ImmutableFixedInflationSwapConvention.builder().name(NAME).fixedLeg(FIXED).floatingLeg(INFL).spotDateOffset(PLUS_ONE_DAY).build();

            assertEquals(test.Name, NAME);
            assertEquals(test.FixedLeg, FIXED);
            assertEquals(test.FloatingLeg, INFL);
            assertEquals(test.SpotDateOffset, PLUS_ONE_DAY);
        }
        public virtual void test_of_spotDateOffset()
        {
            ImmutableFixedInflationSwapConvention test = ImmutableFixedInflationSwapConvention.of(NAME, FIXED, INFL, PLUS_ONE_DAY);

            assertEquals(test.Name, NAME);
            assertEquals(test.FixedLeg, FIXED);
            assertEquals(test.FloatingLeg, INFL);
            assertEquals(test.SpotDateOffset, PLUS_ONE_DAY);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ImmutableFixedInflationSwapConvention test = ImmutableFixedInflationSwapConvention.of(NAME, FIXED, INFL, PLUS_ONE_DAY);

            coverImmutableBean(test);
            ImmutableFixedInflationSwapConvention test2 = ImmutableFixedInflationSwapConvention.of(NAME, FIXED2, INFL2, PLUS_ONE_DAY);

            coverBeanEquals(test, test2);
            ImmutableFixedInflationSwapConvention test3 = ImmutableFixedInflationSwapConvention.of(NAME, FIXED, INFL3, PLUS_ONE_DAY);

            coverBeanEquals(test, test3);
        }
        //-------------------------------------------------------------------------
        public virtual void test_toTrade_dates()
        {
            ImmutableFixedInflationSwapConvention @base = ImmutableFixedInflationSwapConvention.of(NAME, FIXED, INFL, PLUS_ONE_DAY);
            LocalDate tradeDate = LocalDate.of(2015, 5, 5);
            LocalDate startDate = date(2015, 8, 5);
            LocalDate endDate   = date(2017, 8, 5);
            SwapTrade test      = @base.toTrade(tradeDate, startDate, endDate, BUY, NOTIONAL_2M, 0.25d);
            Swap      expected  = Swap.of(FIXED.toLeg(startDate, endDate, PAY, NOTIONAL_2M, 0.25d), INFL.toLeg(startDate, endDate, RECEIVE, NOTIONAL_2M));

            assertEquals(test.Info.TradeDate, tradeDate);
            assertEquals(test.Product, expected);
        }
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         ImmutableFixedInflationSwapConvention other = (ImmutableFixedInflationSwapConvention)obj;
         return(JodaBeanUtils.equal(name, other.name) && JodaBeanUtils.equal(fixedLeg, other.fixedLeg) && JodaBeanUtils.equal(floatingLeg, other.floatingLeg) && JodaBeanUtils.equal(spotDateOffset, other.spotDateOffset));
     }
     return(false);
 }
        public virtual void test_serialization()
        {
            FixedInflationSwapConvention test = ImmutableFixedInflationSwapConvention.of(NAME, FIXED, INFL, PLUS_ONE_DAY);

            assertSerialization(test);
        }