File tree Expand file tree Collapse file tree
google-cloud-bigquery/src
main/java/com/google/cloud/bigquery
test/java/com/google/cloud/bigquery Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public abstract class JobConfiguration implements Serializable {
3636 /**
3737 * Type of a BigQuery Job.
3838 */
39- enum Type {
39+ public enum Type {
4040 /**
4141 * A Copy Job copies an existing table to another new or existing table. Instances of
4242 * {@code JobConfiguration} for this type are implemented by {@link CopyJobConfiguration}.
Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ public void testSetProjectId() {
118118 }
119119 }
120120
121+ @ Test
122+ public void testGetType () {
123+ assertEquals (JobConfiguration .Type .COPY , COPY_JOB_CONFIGURATION .getType ());
124+ assertEquals (JobConfiguration .Type .COPY , COPY_JOB_CONFIGURATION_MULTIPLE_TABLES .getType ());
125+ }
126+
121127 private void compareCopyJobConfiguration (CopyJobConfiguration expected ,
122128 CopyJobConfiguration value ) {
123129 assertEquals (expected , value );
Original file line number Diff line number Diff line change @@ -125,6 +125,12 @@ public void testSetProjectId() {
125125 assertEquals ("p" , configuration .getSourceTable ().getProject ());
126126 }
127127
128+ @ Test
129+ public void testGetType () {
130+ assertEquals (JobConfiguration .Type .EXTRACT , EXTRACT_CONFIGURATION .getType ());
131+ assertEquals (JobConfiguration .Type .EXTRACT , EXTRACT_CONFIGURATION_ONE_URI .getType ());
132+ }
133+
128134 private void compareExtractJobConfiguration (ExtractJobConfiguration expected ,
129135 ExtractJobConfiguration value ) {
130136 assertEquals (expected , value );
Original file line number Diff line number Diff line change @@ -109,6 +109,11 @@ public void testSetProjectId() {
109109 assertEquals ("p" , configuration .getDestinationTable ().getProject ());
110110 }
111111
112+ @ Test
113+ public void testGetType () {
114+ assertEquals (JobConfiguration .Type .LOAD , LOAD_CONFIGURATION .getType ());
115+ }
116+
112117 private void compareLoadJobConfiguration (LoadJobConfiguration expected ,
113118 LoadJobConfiguration value ) {
114119 assertEquals (expected , value );
Original file line number Diff line number Diff line change 1919import static org .junit .Assert .assertEquals ;
2020import static org .junit .Assert .assertNotNull ;
2121import static org .junit .Assert .assertNull ;
22- import static org .junit .Assert .assertTrue ;
2322
2423import com .google .cloud .bigquery .JobInfo .CreateDisposition ;
2524import com .google .cloud .bigquery .JobInfo .WriteDisposition ;
2625import com .google .cloud .bigquery .QueryJobConfiguration .Priority ;
2726import com .google .common .collect .ImmutableList ;
2827import com .google .common .collect .ImmutableMap ;
29-
30- import org .junit .Test ;
31-
3228import java .util .List ;
3329import java .util .Map ;
30+ import org .junit .Test ;
3431
3532public class QueryJobConfigurationTest {
3633
@@ -134,6 +131,11 @@ public void testSetProjectId() {
134131 assertEquals ("p" , configuration .getDestinationTable ().getProject ());
135132 }
136133
134+ @ Test
135+ public void testGetType () {
136+ assertEquals (JobConfiguration .Type .QUERY , QUERY_JOB_CONFIGURATION .getType ());
137+ }
138+
137139 private void compareQueryJobConfiguration (QueryJobConfiguration expected ,
138140 QueryJobConfiguration value ) {
139141 assertEquals (expected , value );
You can’t perform that action at this time.
0 commit comments