public void SetEnabledFields_OptionObject2015_ListFieldNumbers_Null() { string fieldNumber = "123"; FieldObject fieldObject = new FieldObject(fieldNumber); List <string> fieldNumbers = null; RowObject rowObject = new RowObject(); rowObject.AddFieldObject(fieldObject); FormObject formObject = new FormObject("1"); formObject.AddRowObject(rowObject); OptionObject2015 optionObject = new OptionObject2015(); optionObject.AddFormObject(formObject); optionObject.SetEnabledFields(fieldNumbers); Assert.IsTrue(optionObject.IsFieldEnabled(fieldNumber)); }
public void SetEnabledFields_OptionObject2015_Null_ListFieldNumbers() { string fieldNumber = "123"; FieldObject fieldObject = new FieldObject(fieldNumber); List <string> fieldNumbers = new List <string>() { fieldNumber }; RowObject rowObject = new RowObject(); rowObject.AddFieldObject(fieldObject); FormObject formObject = new FormObject("1"); formObject.AddRowObject(rowObject); OptionObject2015 optionObject = null; optionObject.SetEnabledFields(fieldNumbers); Assert.IsFalse(optionObject.IsFieldEnabled(fieldNumber)); Assert.IsFalse(optionObject.IsFieldRequired(fieldNumber)); }