public void testTableRowParsing() { StagingTable table = new StagingTable(); table.setId("test_table"); table.setColumnDefinitions(new List <IColumnDefinition>() { new StagingColumnDefinition("key1", "Input 1", ColumnType.INPUT) }); table.setRawRows(new List <List <String> >()); table.getRawRows().Add(new List <String>() { ",1,2,3" }); table.getRawRows().Add(new List <String>() { "1,2,3," }); StagingDataProvider.initTable(table); Assert.AreEqual(2, table.getTableRows().Count); //StagingTableRow List <ITableRow> tablerows = table.getTableRows(); StagingTableRow row = (tablerows[0] as StagingTableRow); Assert.AreEqual(4, row.getInputs()["key1"].Count); row = (tablerows[1] as StagingTableRow); Assert.AreEqual(4, row.getInputs()["key1"].Count); }
public void testRangeParsing() { StagingTable table = _STAGING.getTable("path_n_daj"); Assert.IsNotNull(table); Assert.AreEqual("p0I-", table.getRawRows()[2][0]); StagingTableRow tablerow = (table.getTableRows()[2] as StagingTableRow); Assert.AreEqual("p0I-", tablerow.getInputs()["path_n"][0].getLow()); tablerow = (table.getTableRows()[2] as StagingTableRow); Assert.AreEqual("p0I-", tablerow.getInputs()["path_n"][0].getHigh()); }