use of com.google.cloud.bigquery.BigQueryError in project google-cloud-java by GoogleCloudPlatform.
the class ITBigQueryTest method testUpdateNonExistingTable.
@Test
public void testUpdateNonExistingTable() {
TableInfo tableInfo = TableInfo.of(TableId.of(DATASET, "test_update_non_existing_table"), StandardTableDefinition.of(SIMPLE_SCHEMA));
try {
bigquery.update(tableInfo);
fail("BigQueryException was expected");
} catch (BigQueryException e) {
BigQueryError error = e.getError();
assertNotNull(error);
assertEquals("notFound", error.getReason());
assertNotNull(error.getMessage());
}
}
Aggregations