public void SetTestData(Table table, int row) { if (table != null && row > -1) for (int i = 0; i < Parameters.Count; i++) { var key = Parameters[i].ToString().Replace("<", "").Replace(">", ""); if (Parameters[i].ToString().StartsWith("<") && Parameters[i].ToString().EndsWith(">")) Parameters[i] = table.GetCellValue(key, row); } }
public void SetTestData(Table table) { Parameters.Add(table); }
public void IHaveAStepTable(Table table) { Assert.NotNull(table); Assert.NotNull(table.HeaderRow); Assert.NotNull(table.DataRows); Assert.AreEqual(2, table.DataRows.Count); }
public void IHaveACommonStep(Table table) { Assert.NotNull(table); Assert.NotNull(table.HeaderRow); Assert.NotNull(table.DataRows); }
public Table Parse(List<string> lines, ref int currentLine) { var table = new Table(); if (lines[currentLine].StartsWith(LanguageElements.TableDelimiter)) { var split = lines[currentLine].Split(LanguageElements.TableDelimiter.ToCharArray()).ToList(); foreach (string h in split) if (!string.IsNullOrEmpty(h)) table.HeaderRow.Add(h.Trim()); currentLine++; } while (lines[currentLine].StartsWith(LanguageElements.TableDelimiter)) { var split = lines[currentLine].Split(LanguageElements.TableDelimiter.ToCharArray()).ToList(); split.RemoveAll(c => string.IsNullOrEmpty(c)); table.AddRowData(split.ToArray()); if (currentLine == lines.Count - 1) lines[currentLine] = "<EOF>"; else currentLine++; } return table; }
public string InsertValue(Table table, string parameter, int row) { var key = parameter.Replace("<", "").Replace(">", ""); return table.GetCellValue(key, row); }