Пример #1
0
 private SimpleConstantContinuousBarrier(BarrierType barrierType, KnockType knockType, double barrierLevel)
 {
     JodaBeanUtils.notNull(barrierType, "barrierType");
     JodaBeanUtils.notNull(knockType, "knockType");
     this.barrierType  = barrierType;
     this.knockType    = knockType;
     this.barrierLevel = barrierLevel;
 }
Пример #2
0
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 1029043089:         // barrierType
                    this.barrierType = (BarrierType)newValue;
                    break;

                case 975895086:         // knockType
                    this.knockType = (KnockType)newValue;
                    break;

                case 1827586573:         // barrierLevel
                    this.barrierLevel = (double?)newValue.Value;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Пример #3
0
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => BarrierType.of(null));
 }
Пример #4
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => BarrierType.of("Rubbish"));
 }
Пример #5
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(BarrierType type, String name)
        public virtual void test_of_lookup(BarrierType type, string name)
        {
            assertEquals(BarrierType.of(name), type);
        }
Пример #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_toString(BarrierType type, String name)
        public virtual void test_toString(BarrierType type, string name)
        {
            assertEquals(type.ToString(), name);
        }
Пример #7
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains the continuous barrier with constant barrier level.
 /// </summary>
 /// <param name="barrierType">  the barrier type </param>
 /// <param name="knockType">  the knock type </param>
 /// <param name="barrierLevel">  the barrier level </param>
 /// <returns> the instance </returns>
 public static SimpleConstantContinuousBarrier of(BarrierType barrierType, KnockType knockType, double barrierLevel)
 {
     return(new SimpleConstantContinuousBarrier(barrierType, knockType, barrierLevel));
 }