1515 */
1616package com .google .cloud .bigquery .storage .v1 ;
1717
18- import static org .junit .Assert .assertEquals ;
19- import static org .junit .Assert .assertNotNull ;
20- import static org .junit .Assert .assertTrue ;
18+ import static org .junit .jupiter . api . Assertions .assertEquals ;
19+ import static org .junit .jupiter . api . Assertions .assertNotNull ;
20+ import static org .junit .jupiter . api . Assertions .assertTrue ;
2121
2222import com .google .cloud .bigquery .storage .test .JsonTest ;
2323import com .google .cloud .bigquery .storage .test .SchemaTest ;
2929import com .google .protobuf .Int64Value ;
3030import java .util .HashMap ;
3131import java .util .Map ;
32- import org .junit .Test ;
33- import org .junit .runner .RunWith ;
34- import org .junit .runners .JUnit4 ;
32+ import org .junit .jupiter .api .Test ;
3533
36- @ RunWith (JUnit4 .class )
37- public class BQTableSchemaToProtoDescriptorTest {
34+ class BQTableSchemaToProtoDescriptorTest {
3835 // This is a map between the TableFieldSchema.Type and the descriptor it is supposed to
3936 // produce. The produced descriptor will be used to check against the entry values here.
4037 private static Map <TableFieldSchema .Type , Descriptor > BQTableTypeToCorrectProtoDescriptorTest =
@@ -82,7 +79,7 @@ private void assertDescriptorsAreEqual(Descriptor expected, Descriptor actual) {
8279 // Check type
8380 FieldDescriptor .Type convertedType = convertedField .getType ();
8481 FieldDescriptor .Type originalType = expectedField .getType ();
85- assertEquals (convertedField .getName (), convertedType , originalType );
82+ assertEquals (convertedType , originalType , convertedField .getName ());
8683 // Check mode
8784 assertEquals (expectedField .isRepeated (), convertedField .isRepeated ());
8885 assertEquals (expectedField .isRequired (), convertedField .isRequired ());
@@ -95,7 +92,7 @@ private void assertDescriptorsAreEqual(Descriptor expected, Descriptor actual) {
9592 }
9693
9794 @ Test
98- public void testSimpleTypes () throws Exception {
95+ void testSimpleTypes () throws Exception {
9996 for (Map .Entry <TableFieldSchema .Type , Descriptor > entry :
10097 BQTableTypeToCorrectProtoDescriptorTest .entrySet ()) {
10198 final TableFieldSchema tableFieldSchema =
@@ -114,7 +111,7 @@ public void testSimpleTypes() throws Exception {
114111
115112 // BQ Timestamp field with higher precision (12) is mapped to a String protobuf type (not int64)
116113 @ Test
117- public void testTimestampType_higherTimestampPrecision ()
114+ void testTimestampType_higherTimestampPrecision ()
118115 throws Descriptors .DescriptorValidationException {
119116 TableFieldSchema tableFieldSchema =
120117 TableFieldSchema .newBuilder ()
@@ -130,7 +127,7 @@ public void testTimestampType_higherTimestampPrecision()
130127 }
131128
132129 @ Test
133- public void testRange () throws Exception {
130+ void testRange () throws Exception {
134131 final TableSchema tableSchema =
135132 TableSchema .newBuilder ()
136133 .addFields (
@@ -200,7 +197,7 @@ public void testRange() throws Exception {
200197 }
201198
202199 @ Test
203- public void testStructSimple () throws Exception {
200+ void testStructSimple () throws Exception {
204201 final TableFieldSchema stringType =
205202 TableFieldSchema .newBuilder ()
206203 .setType (TableFieldSchema .Type .STRING )
@@ -221,7 +218,7 @@ public void testStructSimple() throws Exception {
221218 }
222219
223220 @ Test
224- public void testStructComplex () throws Exception {
221+ void testStructComplex () throws Exception {
225222 final TableFieldSchema test_int =
226223 TableFieldSchema .newBuilder ()
227224 .setType (TableFieldSchema .Type .INT64 )
@@ -467,7 +464,7 @@ public void testStructComplex() throws Exception {
467464 }
468465
469466 @ Test
470- public void testCasingComplexStruct () throws Exception {
467+ void testCasingComplexStruct () throws Exception {
471468 final TableFieldSchema required =
472469 TableFieldSchema .newBuilder ()
473470 .setType (TableFieldSchema .Type .INT64 )
@@ -547,7 +544,7 @@ public void testCasingComplexStruct() throws Exception {
547544 }
548545
549546 @ Test
550- public void testOptions () throws Exception {
547+ void testOptions () throws Exception {
551548 final TableFieldSchema required =
552549 TableFieldSchema .newBuilder ()
553550 .setType (TableFieldSchema .Type .INT64 )
@@ -578,7 +575,7 @@ public void testOptions() throws Exception {
578575 }
579576
580577 @ Test
581- public void testDescriptorReuseDuringCreation () throws Exception {
578+ void testDescriptorReuseDuringCreation () throws Exception {
582579 final TableFieldSchema test_int =
583580 TableFieldSchema .newBuilder ()
584581 .setType (TableFieldSchema .Type .INT64 )
@@ -635,7 +632,7 @@ public void testDescriptorReuseDuringCreation() throws Exception {
635632 }
636633
637634 @ Test
638- public void testNestedFlexibleFieldName () throws Exception {
635+ void testNestedFlexibleFieldName () throws Exception {
639636 final TableFieldSchema stringField =
640637 TableFieldSchema .newBuilder ()
641638 .setType (TableFieldSchema .Type .STRING )
@@ -663,7 +660,7 @@ public void testNestedFlexibleFieldName() throws Exception {
663660 }
664661
665662 @ Test
666- public void timestampField_defaultPrecision () throws Exception {
663+ void timestampField_defaultPrecision () throws Exception {
667664 TableFieldSchema timestampField =
668665 TableFieldSchema .newBuilder ()
669666 .setType (TableFieldSchema .Type .TIMESTAMP )
@@ -676,7 +673,7 @@ public void timestampField_defaultPrecision() throws Exception {
676673 }
677674
678675 @ Test
679- public void timestampField_picosecondPrecision () throws Exception {
676+ void timestampField_picosecondPrecision () throws Exception {
680677 TableFieldSchema timestampField =
681678 TableFieldSchema .newBuilder ()
682679 .setType (TableFieldSchema .Type .TIMESTAMP )
@@ -690,7 +687,7 @@ public void timestampField_picosecondPrecision() throws Exception {
690687 }
691688
692689 @ Test
693- public void timestampField_unexpectedPrecision () throws Exception {
690+ void timestampField_unexpectedPrecision () throws Exception {
694691 TableFieldSchema timestampField =
695692 TableFieldSchema .newBuilder ()
696693 .setType (TableFieldSchema .Type .TIMESTAMP )
0 commit comments