1010
1111package ucar .nc2 .iosp .grib ;
1212
13+ import static com .google .common .truth .Truth .assertThat ;
14+
1315import org .junit .Test ;
1416import org .junit .experimental .categories .Category ;
1517import org .junit .runner .RunWith ;
@@ -103,15 +105,15 @@ public void checkTimeIntervalCoordinates() throws Exception {
103105 best = ncf .getRootGroup ();
104106 }
105107 Variable var = ncf .findVariableByAttribute (best , Grib .VARIABLE_ID_ATTNAME , parameter );
106- assert var != null : parameter ;
108+ assertThat ( var != null ). isTrue () ;
107109 logger .debug (" using variable " + var .getFullName ());
108110
109111 Dimension dim = var .getDimension (0 );
110112 if (dim .getShortName ().startsWith ("reftime" ))
111113 dim = var .getDimension (1 );
112114 String bounds = dim .getShortName () + "_bounds" ;
113115 Variable interval = best .findVariableLocal (bounds );
114- assert interval != null : bounds ;
116+ assertThat ( interval != null ). isTrue () ;
115117
116118 Array data = interval .read ();
117119 IndexIterator iter = data .getIndexIterator ();
@@ -124,8 +126,8 @@ public void checkTimeIntervalCoordinates() throws Exception {
124126 + " failed" );
125127 logger .error ("interval " + start + " - " + end + " known " + tb [idx ][0 ] + " - " + tb [idx ][0 ]);
126128 }
127- assert (start == tb [idx ][0 ]);
128- assert (end == tb [idx ][1 ]);
129+ assertThat (start ). isEqualTo ( tb [idx ][0 ]);
130+ assertThat (end ). isEqualTo ( tb [idx ][1 ]);
129131 idx ++;
130132 }
131133
0 commit comments