@@ -288,7 +288,7 @@ public void testQuality( Object quality, String result) {
288288 assertEquals (result , transformation .generate ());
289289 }
290290 @ SuppressWarnings ("unused" )
291- private Object parametersForTestQuality () {
291+ private Object [][] parametersForTestQuality () {
292292 return new Object [][]{
293293 {0.4 , "q_0.4" },
294294 {"0.4" , "q_0.4" },
@@ -298,10 +298,24 @@ private Object parametersForTestQuality() {
298298 }
299299
300300 @ Test
301- public void testAutoGravity (){
302- Transformation transformation = new Transformation ().crop ("crop" ).gravity ("auto" ).width (0.5f );
301+ @ TestCaseName ("{method}: {0}" )
302+ @ Parameters
303+ public void testAutoGravity (String value , String serialized ){
304+ Transformation transformation = new Transformation ().crop ("crop" ).gravity (value ).width (0.5f );
303305 String result = cloudinary .url ().transformation (transformation ).generate ("test" );
304- assertEquals (DEFAULT_UPLOAD_PATH + "c_crop,g_auto,w_0.5/test" , result );
306+ assertEquals (DEFAULT_UPLOAD_PATH + "c_crop," + serialized + ",w_0.5/test" , result );
307+ }
308+ @ SuppressWarnings ("unused" )
309+ private String [][] parametersForTestAutoGravity () {
310+ return new String [][]{
311+ {"west" , "g_west" },
312+ {"auto" , "g_auto" },
313+ {"auto:good" , "g_auto:good" },
314+ {"auto:ocr_text" , "g_auto:ocr_text" },
315+ {"ocr_text" , "g_ocr_text" },
316+ {"ocr_text:adv_ocr" , "g_ocr_text:adv_ocr" }
317+ };
318+
305319 }
306320
307321 @ Test
0 commit comments