Ejemplo n.º 1
0
        public void DeleteRowObject_Helper_FromFormObject_Null()
        {
            FormObject formObject = null;

            ScriptLinkHelpers.DeleteRowObject(formObject, "1||1");
            Assert.IsFalse(formObject.IsFieldPresent("1||1"));
        }
        public void IsFieldPresent_FormObject_Null()
        {
            string     fieldNumber = "123";
            FormObject formObject  = null;

            Assert.IsFalse(formObject.IsFieldPresent(fieldNumber));
        }
Ejemplo n.º 3
0
        public void DeleteRowObject_FromFormObject_Null()
        {
            FormObject formObject = null;

            formObject.DeleteRowObject("1||1");
            Assert.IsFalse(formObject.IsFieldPresent("1||1"));
        }
        public void DeleteRowObject_OptionObjectHelpers_FormObject_Null_RowId_Error()
        {
            FormObject formObject = null;

            OptionObjectHelpers.DeleteRowObject(formObject, "1||1");
            Assert.IsFalse(formObject.IsFieldPresent("1||1"));
        }
        public void DeleteRowObject_OptionObjectHelpers_FormObject_RowObject_Null_Error()
        {
            RowObject  rowObject  = null;
            FormObject formObject = new FormObject();

            OptionObjectHelpers.DeleteRowObject(formObject, rowObject);

            Assert.IsFalse(formObject.IsFieldPresent("1||1"));
        }
        public void IsFieldPresent_FormObject_IsNotPresent()
        {
            string    fieldNumber = "123";
            RowObject rowObject   = new RowObject();

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

            formObject.AddRowObject(rowObject);
            Assert.IsFalse(formObject.IsFieldPresent("234"));
        }
        public void FormObject_Clone_AreEqual()
        {
            List <FieldObject> fieldObjects = new List <FieldObject>
            {
                new FieldObject("123", "Test")
            };
            RowObject  rowObject  = new RowObject("1||1", fieldObjects);
            FormObject formObject = new FormObject("1", rowObject);

            FormObject cloneObject = formObject.Clone();

            Assert.AreEqual(formObject, cloneObject);
            Assert.IsTrue(formObject.IsFieldPresent("123"));
            Assert.IsTrue(cloneObject.IsFieldPresent("123"));
        }
Ejemplo n.º 8
0
        public void Clone_FormObject_AreEqual()
        {
            List <FieldObject> fieldObjects = new List <FieldObject>
            {
                new FieldObject("123", "Test")
            };
            RowObject  rowObject  = new RowObject("1||1", fieldObjects);
            FormObject formObject = new FormObject("1", rowObject);

            FormObject cloneFormObject = (FormObject)ScriptLinkHelpers.Clone(formObject);

            Assert.AreEqual(formObject, cloneFormObject);
            Assert.IsTrue(formObject.IsFieldPresent("123"));
            Assert.IsTrue(cloneFormObject.IsFieldPresent("123"));
        }
        public void FormObject_Clone_AreNotEqual()
        {
            List <FieldObject> fieldObjects = new List <FieldObject>
            {
                new FieldObject("123", "Test")
            };
            RowObject  rowObject  = new RowObject("1||1", fieldObjects);
            FormObject formObject = new FormObject("1", rowObject);

            FormObject cloneObject = formObject.Clone();

            formObject.DeleteRowObject(rowObject);

            Assert.AreNotEqual(formObject.ToJson(), cloneObject.ToJson());
            Assert.AreNotEqual(formObject, cloneObject);
            Assert.IsTrue(formObject.IsFieldPresent("123"));
            Assert.IsTrue(formObject.IsRowMarkedForDeletion("1||1"));
            Assert.IsTrue(cloneObject.IsFieldPresent("123"));
            Assert.IsFalse(cloneObject.IsRowMarkedForDeletion("1||1"));
        }
        public void FormObject_IsFieldPresent_IsFalse()
        {
            FieldObject fieldObject = new FieldObject
            {
                Enabled     = "0",
                FieldNumber = "123",
                FieldValue  = "TEST",
                Lock        = "0",
                Required    = "0"
            };
            RowObject rowObject = new RowObject();

            rowObject.Fields.Add(fieldObject);
            FormObject formObject = new FormObject
            {
                CurrentRow = rowObject
            };

            Assert.IsFalse(formObject.IsFieldPresent("124"));
        }