Example #1
0
        public void IsFieldLocked_OptionObject_Null()
        {
            string       fieldNumber  = "123";
            OptionObject optionObject = null;

            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #2
0
        public void SetUnlockedField_OptionObject_Helper_Null_FieldNumber()
        {
            string       fieldNumber  = "123";
            OptionObject optionObject = null;

            ScriptLinkHelpers.SetUnlockedField(optionObject, fieldNumber);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #3
0
        public void SetUnlockedField_OptionObject_Null_FieldNumber()
        {
            string       fieldNumber  = "123";
            OptionObject optionObject = null;

            optionObject.SetUnlockedField(fieldNumber);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #4
0
        public void IsFieldLocked_OptionObject_FirstForm_IsNotLocked()
        {
            string    fieldNumber = "123";
            RowObject rowObject   = new RowObject();

            rowObject.AddFieldObject(new FieldObject(fieldNumber, "", false, false, false));
            FormObject formObject = new FormObject("1");

            formObject.AddRowObject(rowObject);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #5
0
        public void SetUnlockedField_OptionObject_Helper_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);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject);
            ScriptLinkHelpers.SetUnlockedField(optionObject, fieldNumber);
            Assert.IsFalse(optionObject.IsFieldLocked("234"));
        }
Example #6
0
        public void SetUnlockedField_OptionObject_FieldNumber()
        {
            string      fieldNumber = "123";
            FieldObject fieldObject = new FieldObject(fieldNumber);
            RowObject   rowObject   = new RowObject();

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

            formObject.AddRowObject(rowObject);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject);
            optionObject.SetUnlockedField(fieldNumber);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #7
0
        public void IsFieldLocked_OptionObject_IsNotPresent()
        {
            string    fieldNumber = "123";
            RowObject rowObject   = new RowObject();

            rowObject.AddFieldObject(new FieldObject(fieldNumber, "", false, false, false));
            FormObject formObject1 = new FormObject("1");
            FormObject formObject2 = new FormObject("2");

            formObject2.AddRowObject(rowObject);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject1);
            optionObject.AddFormObject(formObject2);
            Assert.IsTrue(optionObject.IsFieldLocked("234"));
        }
Example #8
0
        public void SetLockedFields_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.SetLockedFields(fieldNumbers);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #9
0
        public void SetUnlockedFields_OptionObject_Helper_ListFieldObjects_Null()
        {
            string             fieldNumber  = "123";
            FieldObject        fieldObject  = new FieldObject(fieldNumber);
            List <FieldObject> fieldObjects = null;
            RowObject          rowObject    = new RowObject();

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

            formObject.AddRowObject(rowObject);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject);
            ScriptLinkHelpers.SetUnlockedFields(optionObject, fieldObjects);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #10
0
        public void SetLockedFields_OptionObject_Null_Helper_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);
            OptionObject optionObject = null;

            ScriptLinkHelpers.SetLockedFields(optionObject, fieldNumbers);
            Assert.IsFalse(optionObject.IsFieldLocked(fieldNumber));
        }
Example #11
0
        public void SetLockedFields_OptionObject_Helper_ListFieldObjects()
        {
            string             fieldNumber  = "123";
            FieldObject        fieldObject  = new FieldObject(fieldNumber);
            List <FieldObject> fieldObjects = new List <FieldObject>()
            {
                fieldObject
            };
            RowObject rowObject = new RowObject();

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

            formObject.AddRowObject(rowObject);
            OptionObject optionObject = new OptionObject();

            optionObject.AddFormObject(formObject);
            OptionObjectHelpers.SetLockedFields(optionObject, fieldObjects);
            Assert.IsTrue(optionObject.IsFieldLocked(fieldNumber));
        }
        public void OptionObject_IsFieldLocked_IsTrue()
        {
            var actual = configuredOptionObject.IsFieldLocked("123");

            Assert.IsTrue(actual);
        }