public void ToDataTable_Throws_Ex_If_Input_Type_Is_Not_Supported() { //Arrange var converter = new BasicFrameToDataTableConverter(); IFrame frame0 = new DummyFrame(); //Act, Assert var ex = Assert.Throws<ArgumentException>(() => converter.ToDataTable(frame0)); }
public void ToDataTable_Converts_BasicFrame_To_DataTable(int testId, int initRowCount, int newRowCount, int expectedRowCount, Type[] colTypes) { //Arrange var converter = new BasicFrameToDataTableConverter(); var frame0 = BasicFrameGenerator.CreateTable(initRowCount, colTypes); //Act DataTable table = converter.ToDataTable(frame0); //Assert Assert.NotNull(table); Assert.Equal(frame0.RowCount, table.Rows.Count); Assert.Equal(frame0.ColumnCount, table.Columns.Count); Assert.Equal(frame0.Rows.Count, table.Rows.Count); Assert.Equal(frame0.Columns.Count, table.Columns.Count); }