Skip to content

Commit 5829d81

Browse files
committed
Add functional classes to SerializationTest
1 parent 94533b2 commit 5829d81

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

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

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

228234
@Test
229235
public void testServiceOptions() throws Exception {
@@ -256,7 +262,7 @@ public void testModelAndRequests() throws Exception {
256262
BigQuery.DatasetOption.fields(), BigQuery.DatasetDeleteOption.deleteContents(),
257263
BigQuery.DatasetListOption.all(), BigQuery.TableOption.fields(),
258264
BigQuery.TableListOption.maxResults(42L), BigQuery.JobOption.fields(),
259-
BigQuery.JobListOption.allUsers()};
265+
BigQuery.JobListOption.allUsers(), DATASET, TABLE, JOB};
260266
for (Serializable obj : objects) {
261267
Object copy = serializeAndDeserialize(obj);
262268
assertEquals(obj, obj);

0 commit comments

Comments
 (0)