public class TestBigQuery extends java.lang.Object implements org.junit.rules.TestRule
Deletes the table on test shutdown.
| Modifier and Type | Class and Description |
|---|---|
static interface |
TestBigQuery.PollingAssertion
Interface to implement a polling assertion.
|
static interface |
TestBigQuery.RowsAssertion
Interface for creating a polling eventual assertion.
|
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
Description description) |
TestBigQuery.RowsAssertion |
assertThatAllRows(Schema rowSchema) |
static TestBigQuery |
create(Schema tableSchema)
Creates an instance of this rule.
|
java.util.List<Row> |
getFlatJsonRows(Schema rowSchema)
|
java.lang.String |
tableSpec() |
public static TestBigQuery create(Schema tableSchema)
Loads GCP configuration from TestPipelineOptions.
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, Description description)
apply in interface org.junit.rules.TestRulepublic java.lang.String tableSpec()
public java.util.List<Row> getFlatJsonRows(Schema rowSchema)
Rows with given Schema.
Current implementation only supports flat Rows and target Schemas
with Schema.FieldType.STRING fields only.
public TestBigQuery.RowsAssertion assertThatAllRows(Schema rowSchema)