Skip to content

Commit 9428a03

Browse files
committed
Add functional classes to SerializationTest
1 parent 94533b2 commit 9428a03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/SerializationTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ public class SerializationTest {
224224
.jobCompleted(true)
225225
.result(QUERY_RESULT)
226226
.build();
227+
private static final BigQuery BIGQUERY = BigQueryOptions.defaultInstance().service();
228+
private static final Dataset DATASET =
229+
new Dataset(BIGQUERY, new DatasetInfo.BuilderImpl(DATASET_INFO));
230+
private static final Table TABLE = new Table(BIGQUERY, new TableInfo.BuilderImpl(TABLE_INFO));
231+
private static final Job JOB = new Job(BIGQUERY, new JobInfo.BuilderImpl(JOB_INFO));
227232

228233
@Test
229234
public void testServiceOptions() throws Exception {
@@ -256,7 +261,7 @@ public void testModelAndRequests() throws Exception {
256261
BigQuery.DatasetOption.fields(), BigQuery.DatasetDeleteOption.deleteContents(),
257262
BigQuery.DatasetListOption.all(), BigQuery.TableOption.fields(),
258263
BigQuery.TableListOption.maxResults(42L), BigQuery.JobOption.fields(),
259-
BigQuery.JobListOption.allUsers()};
264+
BigQuery.JobListOption.allUsers(), DATASET, TABLE, JOB};
260265
for (Serializable obj : objects) {
261266
Object copy = serializeAndDeserialize(obj);
262267
assertEquals(obj, obj);

0 commit comments

Comments
 (0)