public virtual void test_of_oneLeg() { ResolvedCms test = ResolvedCms.of(CMS_LEG); assertEquals(test.CmsLeg, CMS_LEG); assertFalse(test.PayLeg.Present); assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(CMS_LEG.Currency)); }
private ResolvedCmsTrade(TradeInfo info, ResolvedCms product, Payment premium) { JodaBeanUtils.notNull(info, "info"); JodaBeanUtils.notNull(product, "product"); this.info = info; this.product = product; this.premium = premium; }
//------------------------------------------------------------------------- public virtual void test_of_twoLegs() { ResolvedCms test = sut(); assertEquals(test.CmsLeg, CMS_LEG); assertEquals(test.PayLeg.get(), PAY_LEG); assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(CMS_LEG.Currency)); }
public virtual void test_resolve_twoLegs() { Cms @base = sutCap(); ResolvedCms test = @base.resolve(REF_DATA); assertEquals(test.CmsLeg, CMS_LEG.resolve(REF_DATA)); assertEquals(test.PayLeg.get(), PAY_LEG.resolve(REF_DATA)); }
public virtual void test_resolve_oneLeg() { Cms @base = Cms.of(CMS_LEG); ResolvedCms test = @base.resolve(REF_DATA); assertEquals(test.CmsLeg, CMS_LEG.resolve(REF_DATA)); assertFalse(test.PayLeg.Present); }
//----------------------------------------------------------------------- public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { ResolvedCms other = (ResolvedCms)obj; return(JodaBeanUtils.equal(cmsLeg, other.cmsLeg) && JodaBeanUtils.equal(payLeg, other.payLeg)); } return(false); }
public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 3237038: // info this.info_Renamed = (TradeInfo)newValue; break; case -309474065: // product this.product_Renamed = (ResolvedCms)newValue; break; case -318452137: // premium this.premium_Renamed = (Payment)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
/// <summary> /// Sets the resolved CMS product. /// <para> /// The product captures the contracted financial details of the trade. /// </para> /// </summary> /// <param name="product"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public Builder product(ResolvedCms product) { JodaBeanUtils.notNull(product, "product"); this.product_Renamed = product; return(this); }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(ResolvedCmsTrade beanToCopy) { this.info_Renamed = beanToCopy.Info; this.product_Renamed = beanToCopy.Product; this.premium_Renamed = beanToCopy.premium; }
internal static ResolvedCms sut2() { return(ResolvedCms.of(CmsTest.sutFloor().CmsLeg.resolve(REF_DATA))); }
//------------------------------------------------------------------------- internal static ResolvedCms sut() { return(ResolvedCms.of(CMS_LEG, PAY_LEG)); }