File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
vision/cloud-client/src/test/java/com/example/vision Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2727import java .io .IOException ;
2828import java .io .PrintStream ;
2929import java .util .UUID ;
30+ import java .util .regex .Pattern ;
3031
3132import org .junit .After ;
3233import org .junit .Before ;
@@ -46,7 +47,7 @@ public class DetectIT {
4647 private static final String OUTPUT_PREFIX = "OCR_PDF_TEST_OUTPUT_" + UUID .randomUUID ().toString ();
4748
4849 @ Before
49- public void setUp () throws IOException {
50+ public void setUp () {
5051 bout = new ByteArrayOutputStream ();
5152 out = new PrintStream (bout );
5253 System .setOut (out );
@@ -312,8 +313,8 @@ public void testCropHints() throws Exception {
312313 // Assert
313314 String got = bout .toString ();
314315 assertThat (got ).contains ("vertices {" );
315- assertThat (got ).contains ( "x: 599" );
316- assertThat (got ).contains ( "y: 475" );
316+ assertThat (got ).containsMatch ( Pattern . compile ( "x: 2 \\ d{2}" ) );
317+ assertThat (got ).containsMatch ( Pattern . compile ( "y: 4 \\ d{2}" ) );
317318 }
318319
319320 @ Test
@@ -325,8 +326,8 @@ public void testCropHintsGcs() throws Exception {
325326 // Assert
326327 String got = bout .toString ();
327328 assertThat (got ).contains ("vertices {" );
328- assertThat (got ).contains ( "x: 599" );
329- assertThat (got ).contains ( "y: 475" );
329+ assertThat (got ).containsMatch ( Pattern . compile ( "x: 2 \\ d{2}" ) );
330+ assertThat (got ).containsMatch ( Pattern . compile ( "y: 4 \\ d{2}" ) );
330331 }
331332
332333 @ Test
You can’t perform that action at this time.
0 commit comments