Пример #1
0
        public void SetEnabledField_FormObject_Null_FieldNumber()
        {
            string     fieldNumber = "123";
            FormObject formObject  = null;

            formObject.SetEnabledField(fieldNumber);
            Assert.IsTrue(formObject.IsFieldEnabled(fieldNumber));
        }
Пример #2
0
        public void SetEnabledField_FormObject_FieldNumber_IsNotPresent()
        {
            string      fieldNumber = "123";
            FieldObject fieldObject = new FieldObject(fieldNumber);
            RowObject   rowObject   = new RowObject();

            rowObject.AddFieldObject(fieldObject);
            FormObject formObject = new FormObject("1");

            formObject.AddRowObject(rowObject);
            formObject.SetEnabledField(fieldNumber);
            Assert.IsTrue(formObject.IsFieldEnabled("234"));
        }
        public void SetEnabledField_FormObject_FieldNumber()
        {
            string      fieldNumber = "123";
            FieldObject fieldObject = new FieldObject(fieldNumber);
            RowObject   rowObject   = new RowObject();

            rowObject.AddFieldObject(fieldObject);
            FormObject formObject = new FormObject("1");

            formObject.AddRowObject(rowObject);
            formObject.SetEnabledField(fieldNumber);
            Assert.IsTrue(formObject.IsFieldEnabled(fieldNumber));
            Assert.IsFalse(formObject.IsFieldRequired(fieldNumber));
        }