File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
cloudinary-test-common/src/main/java/com/cloudinary/test Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -520,14 +520,18 @@ public void testManualModeration() throws Exception {
520520
521521 @ Test
522522 public void testOcrUpdate () {
523+ Exception expected = null ;
523524 // should support requesting ocr info
524525 try {
525526 Map uploadResult = cloudinary .uploader ().upload (SRC_TEST_IMAGE , ObjectUtils .asMap ("tags" , UPLOAD_TAGS ));
526527 api .update ((String ) uploadResult .get ("public_id" ), ObjectUtils .asMap ("ocr" , "illegal" ));
527528 } catch (Exception e ) {
528- assertTrue (e instanceof BadRequest );
529- assertTrue (e .getMessage ().matches ("^Illegal value(.*)" ));
529+ expected = e ;
530530 }
531+
532+ assertNotNull (expected );
533+ assertTrue (expected instanceof BadRequest );
534+ assertTrue (expected .getMessage ().matches ("^Illegal value(.*)" ));
531535 }
532536
533537 @ Test
You can’t perform that action at this time.
0 commit comments