public void AddFormObject_ToOptionObject2015_NullFormObject() { OptionObject2015 optionObject = new OptionObject2015(); optionObject = (OptionObject2015)OptionObjectHelpers.AddFormObject(optionObject, null); Assert.IsTrue(optionObject.IsFormPresent("1")); }
public void AddFormObject_ToOptionObject2015_ByFormId() { OptionObject2015 optionObject = new OptionObject2015(); optionObject = (OptionObject2015)OptionObjectHelpers.AddFormObject(optionObject, "1", false); Assert.IsTrue(optionObject.IsFormPresent("1")); }
public void AddFormObject_ToOptionObject2015_MIFirstForm() { OptionObject2015 optionObject = new OptionObject2015(); optionObject = (OptionObject2015)OptionObjectHelpers.AddFormObject(optionObject, "1", true); Assert.IsTrue(optionObject.IsFormPresent("1")); }
public void AddFormObject_ToOptionObject2_MINotFirstForm() { OptionObject2 optionObject = new OptionObject2(); optionObject = (OptionObject2)OptionObjectHelpers.AddFormObject(optionObject, "1", false); optionObject = (OptionObject2)OptionObjectHelpers.AddFormObject(optionObject, "2", true); Assert.IsTrue(optionObject.IsFormPresent("2")); }
public void AddFormObject_ToOptionObject2015_NullOptionObject() { FormObject formObject = new FormObject() { FormId = "1", MultipleIteration = false }; OptionObject2015 optionObject = null; optionObject = (OptionObject2015)OptionObjectHelpers.AddFormObject(optionObject, formObject); Assert.IsTrue(optionObject.IsFormPresent("1")); }
public void AddFormObject_ToOptionObject2_Success() { FormObject formObject = new FormObject() { FormId = "1", MultipleIteration = false }; OptionObject2 optionObject = new OptionObject2(); optionObject = (OptionObject2)OptionObjectHelpers.AddFormObject(optionObject, formObject); Assert.IsTrue(optionObject.IsFormPresent("1")); }
public void AddRowObject_ToOptionObject2015_Success() { string formId = "1"; string expected = "1||1"; RowObject rowObject1 = new RowObject(); FormObject formObject = new FormObject() { FormId = formId, MultipleIteration = false }; OptionObject2015 optionObject = new OptionObject2015(); optionObject = (OptionObject2015)OptionObjectHelpers.AddFormObject(optionObject, formObject); optionObject = (OptionObject2015)OptionObjectHelpers.AddRowObject(optionObject, formId, rowObject1); Assert.IsTrue(optionObject.IsRowPresent(expected)); }
public void AddFormObject_ToOptionObject_Duplicate() { FormObject formObject1 = new FormObject() { FormId = "1", MultipleIteration = false }; FormObject formObject2 = new FormObject() { FormId = "1", MultipleIteration = false }; OptionObject optionObject = new OptionObject(); optionObject = (OptionObject)OptionObjectHelpers.AddFormObject(optionObject, formObject1); optionObject = (OptionObject)OptionObjectHelpers.AddFormObject(optionObject, formObject2); Assert.IsTrue(optionObject.IsFormPresent("1")); }
/// <summary> /// Adds a <see cref="FormObject"/> to an <see cref="OptionObject2015"/>. /// </summary> /// <param name="formId"></param> /// <param name="multipleIteration"></param> public void AddFormObject(string formId, bool multipleIteration) => _optionObject.Forms = OptionObjectHelpers.AddFormObject(_optionObject, formId, multipleIteration).Forms;
/// <summary> /// Adds a <see cref="FormObject"/> to an <see cref="OptionObject2015"/>. /// </summary> /// <param name="formObject"></param> public void AddFormObject(FormObject formObject) => _optionObject.Forms = OptionObjectHelpers.AddFormObject(_optionObject, formObject).Forms;
// // IOptionObject2015 Methods // /// <summary> /// Adds a <see cref="FormObject"/> to an <see cref="OptionObject2015"/>. /// </summary> /// <param name="formObject"></param> public void AddFormObject(FormObject formObject) => this.Forms = OptionObjectHelpers.AddFormObject(this, formObject).Forms;