Ejemplo n.º 1
0
 private CurveNodeDateOrder(int minGapInDays, CurveNodeClashAction action)
 {
     JodaBeanUtils.notNull(action, "action");
     this.minGapInDays = minGapInDays;
     this.action       = action;
     validate();
 }
Ejemplo n.º 2
0
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 1925599072:         // minGapInDays
                    this.minGapInDays = (int?)newValue.Value;
                    break;

                case -1422950858:         // action
                    this.action = (CurveNodeClashAction)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Ejemplo n.º 3
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains an instance from the minimum gap, allowing reordering flag and clash action.
 /// </summary>
 /// <param name="minGapInDays">  the minimum gap between this node and the previous node in days, one or greater </param>
 /// <param name="action">  the action to perform if a clash occurs </param>
 /// <returns> an instance specifying a fixed date </returns>
 public static CurveNodeDateOrder of(int minGapInDays, CurveNodeClashAction action)
 {
     return(new CurveNodeDateOrder(minGapInDays, action));
 }
Ejemplo n.º 4
0
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => CurveNodeClashAction.of(null));
 }
Ejemplo n.º 5
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => CurveNodeClashAction.of("Rubbish"));
 }
Ejemplo n.º 6
0
//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(CurveNodeClashAction convention, String name)
        public virtual void test_of_lookup(CurveNodeClashAction convention, string name)
        {
            assertEquals(CurveNodeClashAction.of(name), convention);
        }
Ejemplo n.º 7
0
//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(CurveNodeClashAction convention, String name)
        public virtual void test_toString(CurveNodeClashAction convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }