public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 100346066: // index this.index_Renamed = (FxIndex)newValue; break; case 727652476: // referenceCurrency this.referenceCurrency_Renamed = (Currency)newValue; break; case 232554996: // fixingRelativeTo this.fixingRelativeTo_Renamed = (FxResetFixingRelativeTo)newValue; break; case 873743726: // fixingDateOffset this.fixingDateOffset_Renamed = (DaysAdjustment)newValue; break; case -931164883: // initialNotionalValue this.initialNotionalValue_Renamed = (double?)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> internal Builder(FxResetCalculation beanToCopy) { this.index_Renamed = beanToCopy.Index; this.referenceCurrency_Renamed = beanToCopy.ReferenceCurrency; this.fixingRelativeTo_Renamed = beanToCopy.FixingRelativeTo; this.fixingDateOffset_Renamed = beanToCopy.FixingDateOffset; this.initialNotionalValue_Renamed = beanToCopy.initialNotionalValue; }
private FxResetCalculation(FxIndex index, Currency referenceCurrency, FxResetFixingRelativeTo fixingRelativeTo, DaysAdjustment fixingDateOffset, double?initialNotionalValue) { JodaBeanUtils.notNull(index, "index"); JodaBeanUtils.notNull(referenceCurrency, "referenceCurrency"); JodaBeanUtils.notNull(fixingRelativeTo, "fixingRelativeTo"); JodaBeanUtils.notNull(fixingDateOffset, "fixingDateOffset"); this.index = index; this.referenceCurrency = referenceCurrency; this.fixingRelativeTo = fixingRelativeTo; this.fixingDateOffset = fixingDateOffset; this.initialNotionalValue = initialNotionalValue; validate(); }
/// <summary> /// Sets the base date that each FX reset fixing is made relative to, defaulted to 'PeriodStart'. /// <para> /// The FX reset fixing date is relative to either the start or end of each accrual period. /// </para> /// </summary> /// <param name="fixingRelativeTo"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public Builder fixingRelativeTo(FxResetFixingRelativeTo fixingRelativeTo) { JodaBeanUtils.notNull(fixingRelativeTo, "fixingRelativeTo"); this.fixingRelativeTo_Renamed = fixingRelativeTo; return(this); }
public virtual void test_of_lookup_null() { assertThrows(() => FxResetFixingRelativeTo.of(null), typeof(System.ArgumentException)); }
public virtual void test_of_lookup_notFound() { assertThrows(() => FxResetFixingRelativeTo.of("Rubbish"), typeof(System.ArgumentException)); }
//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(FxResetFixingRelativeTo convention, String name) public virtual void test_of_lookup(FxResetFixingRelativeTo convention, string name) { assertEquals(FxResetFixingRelativeTo.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(FxResetFixingRelativeTo convention, String name) public virtual void test_toString(FxResetFixingRelativeTo convention, string name) { assertEquals(convention.ToString(), name); }