public void WhenSettingIntValue_AndValidationFails_PropertyIsNotSet_And_ResultCodeIsSet_ToIllegal() { _props.SetPropertyValidator(FakeIntPropertyIndex, x => (int)x > 0 ? ResultCodeConstants.Success : ResultCodeConstants.Illegal); var resultCode = _props.SetIntProperty(FakeIntPropertyIndex, -1); _props.GetIntProperty(FakeIntPropertyIndex) .Should() .Be(FakeIntPropertyValue, "because the value should not have been set"); resultCode .Should() .Be(ResultCodeConstants.Illegal, "because when setting an illegal value to a property, the result code is set to Illegal"); }
public int GetPropertyNumber(int lPropIndex) { return(_props.GetIntProperty(lPropIndex)); }