public void WhenSettingStringValue_AndValidationFails_PropertyIsNotSet_And_ResultCodeIsSet_ToIllegal() { _props.SetPropertyValidator(FakeStringPropertyIndex, x => ((string)x).Length > 0 ? ResultCodeConstants.Success : ResultCodeConstants.Illegal); var resultsCode = _props.SetStringProperty(FakeStringPropertyIndex, ""); _props.GetStringProperty(FakeStringPropertyIndex) .Should() .Be(FakeStringPropertyValue, "because the value should not have been set"); resultsCode .Should() .Be(ResultCodeConstants.Illegal, "because when setting an illegal value to a property, the result code is set to Illegal"); }
public void SetPropertyString(int lPropIndex, string StringData) { SetResultCode(_props.SetStringProperty(lPropIndex, StringData)); }