public void GetDataTable() { IReader rd = new WrdReader(); DataTable tbl = rd.GetTable(1, "TestWord.docx").Result; DataRow row = tbl.Rows[0]; StringAssert.Contains(@"$G_2$*550/$\Delta t$", row[1].ToString()); }
public void GetDataTableTest() { IReader rd = new WrdReader(); var tbl = rd.GetTable(0, "TestWord.docx").Result; DataColumn coll = tbl.Columns[0]; StringAssert.Contains("111", coll.ColumnName); }
public void GetTableArrayTest() { IReader rd = new WrdReader(); int[] assert = rd.GetTableArray("TestWord.docx").Result; Assert.IsTrue(assert[1] == 1); }
public void NumberRowsTest() { IReader rd = new WrdReader(); DataTable tbl = rd.GetTable(3, "TestWord.docx").Result; DataRow row = tbl.Rows[1]; StringAssert.Contains(@"1.", row[0].ToString()); }
public void TableReplaceTexTest() { IReader rd = new WrdReader(); DataTable tbl = rd.GetTable(1, "TestWord.docx").Result; var listint = new List <int> { 0, 1 }; DataTable tblTex = rd.TableCleanTex(tbl, listint); DataRow row = tblTex.Rows[1]; StringAssert.Contains(@"($ G^q )_{tt}$/$\Delta t$", row[1].ToString()); }
private static Node NodeFromTable(string tableName, string filename, KindOfTable knd, out ITableToModel rep) { INodeBilder nodeBld = new NodeBilder(); rep = new TableToModel(nodeBld); IReader rd = new WrdReader(); DataTable tbl = rd.GetTable(2, filename).Result; var colNumber = new List <int> { 0, 1, 2, 3, 4 }; var tmpNumber = new List <int> { 5, 6 }; rep.TableToModelConv(tableName, tbl, colNumber, tmpNumber, "сут", knd); Node node = (NodeBilder)nodeBld; return(node); }