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

            configuredOptionObject.SetOptionalFields(optionalFields);
            Assert.IsTrue(configuredOptionObject.IsFieldEnabled("123"));
            Assert.IsFalse(configuredOptionObject.IsFieldRequired("123"));
        }
コード例 #2
0
        public void SetOptionalFields_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.SetOptionalFields(fieldNumbers);
            Assert.IsFalse(optionObject.IsFieldEnabled(fieldNumber));
            Assert.IsFalse(optionObject.IsFieldRequired(fieldNumber));
        }