コード例 #1
0
        public void OptionObject_SetDisabledFields_IsTrue()
        {
            List <string> disabledFields = new List <string> {
                "123"
            };

            configuredOptionObject.SetDisabledFields(disabledFields);
            Assert.IsTrue(!configuredOptionObject.IsFieldEnabled("123"));
        }
コード例 #2
0
        public void SetDisabledFields_OptionObject_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);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject);
            optionObject.SetDisabledFields(fieldNumbers);
            Assert.IsFalse(optionObject.IsFieldEnabled(fieldNumber));
        }