public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 1574023291: // securityId this.securityId_Renamed = (SecurityId)newValue; break; case 1585636160: // notional this.notional_Renamed = (Payment)newValue; break; case 1905311443: // dayCount this.dayCount_Renamed = (DayCount)newValue; break; case -1895216418: // yieldConvention this.yieldConvention_Renamed = (BillYieldConvention)newValue; break; case 866287159: // legalEntityId this.legalEntityId_Renamed = (LegalEntityId)newValue; break; case 135924714: // settlementDateOffset this.settlementDateOffset_Renamed = (DaysAdjustment)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> protected internal Builder(ResolvedBill beanToCopy) { this.securityId_Renamed = beanToCopy.SecurityId; this.notional_Renamed = beanToCopy.Notional; this.dayCount_Renamed = beanToCopy.DayCount; this.yieldConvention_Renamed = beanToCopy.YieldConvention; this.legalEntityId_Renamed = beanToCopy.LegalEntityId; this.settlementDateOffset_Renamed = beanToCopy.SettlementDateOffset; }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(BillSecurity beanToCopy) { this.info_Renamed = beanToCopy.Info; this.notional_Renamed = beanToCopy.Notional; this.dayCount_Renamed = beanToCopy.DayCount; this.yieldConvention_Renamed = beanToCopy.YieldConvention; this.legalEntityId_Renamed = beanToCopy.LegalEntityId; this.settlementDateOffset_Renamed = beanToCopy.SettlementDateOffset; }
/// <summary> /// Restricted constructor. </summary> /// <param name="builder"> the builder to copy from, not null </param> protected internal ResolvedBill(ResolvedBill.Builder builder) { JodaBeanUtils.notNull(builder.securityId_Renamed, "securityId"); JodaBeanUtils.notNull(builder.notional_Renamed, "notional"); JodaBeanUtils.notNull(builder.dayCount_Renamed, "dayCount"); JodaBeanUtils.notNull(builder.yieldConvention_Renamed, "yieldConvention"); JodaBeanUtils.notNull(builder.legalEntityId_Renamed, "legalEntityId"); JodaBeanUtils.notNull(builder.settlementDateOffset_Renamed, "settlementDateOffset"); this.securityId = builder.securityId_Renamed; this.notional = builder.notional_Renamed; this.dayCount = builder.dayCount_Renamed; this.yieldConvention = builder.yieldConvention_Renamed; this.legalEntityId = builder.legalEntityId_Renamed; this.settlementDateOffset = builder.settlementDateOffset_Renamed; }
/// <summary> /// Creates an instance. </summary> /// <param name="securityId"> the value of the property, not null </param> /// <param name="notional"> the value of the property, not null </param> /// <param name="dayCount"> the value of the property, not null </param> /// <param name="yieldConvention"> the value of the property, not null </param> /// <param name="legalEntityId"> the value of the property, not null </param> /// <param name="settlementDateOffset"> the value of the property, not null </param> internal Bill(SecurityId securityId, AdjustablePayment notional, DayCount dayCount, BillYieldConvention yieldConvention, LegalEntityId legalEntityId, DaysAdjustment settlementDateOffset) { JodaBeanUtils.notNull(securityId, "securityId"); JodaBeanUtils.notNull(notional, "notional"); JodaBeanUtils.notNull(dayCount, "dayCount"); JodaBeanUtils.notNull(yieldConvention, "yieldConvention"); JodaBeanUtils.notNull(legalEntityId, "legalEntityId"); JodaBeanUtils.notNull(settlementDateOffset, "settlementDateOffset"); this.securityId = securityId; this.notional = notional; this.dayCount = dayCount; this.yieldConvention = yieldConvention; this.legalEntityId = legalEntityId; this.settlementDateOffset = settlementDateOffset; validate(); }
/// <summary> /// Sets yield convention. /// <para> /// The convention defines how to convert from yield to price and inversely. /// </para> /// </summary> /// <param name="yieldConvention"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public virtual Builder yieldConvention(BillYieldConvention yieldConvention) { JodaBeanUtils.notNull(yieldConvention, "yieldConvention"); this.yieldConvention_Renamed = yieldConvention; return(this); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookupStandard(BillYieldConvention convention, String name) public virtual void test_of_lookupStandard(BillYieldConvention convention, string name) { assertEquals(BillYieldConvention.of(convention.name()), convention); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookupLowerCase(BillYieldConvention convention, String name) public virtual void test_of_lookupLowerCase(BillYieldConvention convention, string name) { assertEquals(BillYieldConvention.of(name.ToLower(Locale.ENGLISH)), convention); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookup(BillYieldConvention convention, String name) public virtual void test_of_lookup(BillYieldConvention convention, string name) { assertEquals(BillYieldConvention.of(name), convention); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(dataProvider = "name") public void test_toString(BillYieldConvention convention, String name) public virtual void test_toString(BillYieldConvention convention, string name) { assertEquals(convention.ToString(), name); }
public virtual void test_of_lookup_null() { assertThrows(() => BillYieldConvention.of(null), typeof(System.ArgumentException)); }
public virtual void test_of_lookup_notFound() { assertThrows(() => BillYieldConvention.of("Rubbish"), typeof(System.ArgumentException)); }