public void GetCurrentRowId_FromFormObject_NoCurrentRow() { string expected = "1||1"; FormObject formObject = new FormObject(); string actual = OptionObjectHelpers.GetCurrentRowId(formObject); Assert.AreNotEqual(expected, actual); }
public void GetCurrentRowId_FromOptionObject2015_NullOptionObject() { string expected = "1||1"; OptionObject2015 optionObject = null; string actual = OptionObjectHelpers.GetCurrentRowId(optionObject, "1"); Assert.AreEqual(expected, actual); }
public void GetCurrentRowId_FromOptionObject2_NoForms() { string expected = "1||1"; OptionObject2 optionObject = new OptionObject2(); string actual = OptionObjectHelpers.GetCurrentRowId(optionObject, "1"); Assert.AreEqual(expected, actual); }
public void GetCurrentRowId_FromOptionObject_NullFormId() { string expected = "1||1"; RowObject rowObject = new RowObject(); FormObject formObject = new FormObject(); formObject.AddRowObject(rowObject); OptionObject optionObject = new OptionObject(); optionObject.AddFormObject(formObject); string actual = OptionObjectHelpers.GetCurrentRowId(optionObject, "1"); Assert.AreEqual(expected, actual); }
public void GetCurrentRowId_FromFormObject_Success() { string expected = "1||1"; RowObject rowObject = new RowObject(); FormObject formObject = new FormObject() { FormId = "1", MultipleIteration = false }; formObject.AddRowObject(rowObject); string actual = OptionObjectHelpers.GetCurrentRowId(formObject); Assert.AreEqual(expected, actual); }
public void GetCurrentRowId_FromOptionObject2015_NoMatchingForms() { string expected = "1||1"; RowObject rowObject = new RowObject(); FormObject formObject = new FormObject() { FormId = "1", MultipleIteration = false }; formObject.AddRowObject(rowObject); OptionObject2015 optionObject = new OptionObject2015(); optionObject.AddFormObject(formObject); string actual = OptionObjectHelpers.GetCurrentRowId(optionObject, "2"); Assert.AreEqual(expected, actual); }
/// <summary> /// Returns the CurrentRow RowId of the form matching the FormId. /// </summary> /// <param name="formId"></param> /// <returns></returns> public string GetCurrentRowId(string formId) => OptionObjectHelpers.GetCurrentRowId(_optionObject, formId);
/// <summary> /// Returns the RowId of the <see cref="CurrentRow"/>. /// </summary> /// <returns></returns> public string GetCurrentRowId() => OptionObjectHelpers.GetCurrentRowId(this);