Package org.dbunit.dataset
Class DataSetBuilder.TableBuilder
java.lang.Object
org.dbunit.dataset.DataSetBuilder.TableBuilder
- Enclosing class:
DataSetBuilder
Fluent builder for a single table within a
DataSetBuilder.-
Method Details
-
columns
Sets the column names for this table. Column data types are set toDataType.UNKNOWNand resolved at runtime by DbUnit.- Parameters:
names- the column names in order- Returns:
- this builder
-
row
Adds a row of values to this table. Values must be in the same order as the columns declared viacolumns(String...).- Parameters:
values- the row values- Returns:
- this builder
-
table
Starts configuring another table, finalizing this one.- Parameters:
name- the next table name- Returns:
- a new
DataSetBuilder.TableBuilderfor the next table
-
build
Builds and returns anIDataSetcontaining all configured tables.- Returns:
- the dataset
- Throws:
DataSetException- if any table configuration is invalid
-