public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 503432553: // modifyingValue this.modifyingValue = (double?)newValue.Value; break; case 3575610: // type this.type = (ValueAdjustmentType)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
private ValueAdjustment(double modifyingValue, ValueAdjustmentType type) { JodaBeanUtils.notNull(type, "type"); this.modifyingValue = modifyingValue; this.type = type; }
public virtual void test_of_lookup_null() { assertThrowsIllegalArg(() => ValueAdjustmentType.of(null)); }
public virtual void test_of_lookup_notFound() { assertThrowsIllegalArg(() => ValueAdjustmentType.of("Rubbish")); }
//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(ValueAdjustmentType convention, String name) public virtual void test_of_lookupLowerCase(ValueAdjustmentType convention, string name) { assertEquals(ValueAdjustmentType.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(ValueAdjustmentType convention, String name) public virtual void test_of_lookup(ValueAdjustmentType convention, string name) { assertEquals(ValueAdjustmentType.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(ValueAdjustmentType convention, String name) public virtual void test_toString(ValueAdjustmentType convention, string name) { assertEquals(convention.ToString(), name); }