示例#1
0
 private CurveNodeDateOrder(int minGapInDays, CurveNodeClashAction action)
 {
     JodaBeanUtils.notNull(action, "action");
     this.minGapInDays = minGapInDays;
     this.action       = action;
     validate();
 }
示例#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);
            }
示例#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));
 }
示例#4
0
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => CurveNodeClashAction.of(null));
 }
示例#5
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => CurveNodeClashAction.of("Rubbish"));
 }
示例#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);
        }
示例#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);
        }