@@ -2951,16 +2951,16 @@ void testToString() throws UnsupportedEncodingException {
29512951 @ Test
29522952 void testTruncate_StringInt () {
29532953 assertNull (StringUtils .truncate (null , 12 ));
2954- assertIllegalArgumentException (() -> StringUtils .truncate (null , -1 ), "maxWith cannot be negative" );
2955- assertIllegalArgumentException (() -> StringUtils .truncate (null , -10 ), "maxWith cannot be negative" );
2956- assertIllegalArgumentException (() -> StringUtils .truncate (null , Integer .MIN_VALUE ), "maxWith cannot be negative" );
2954+ assertIllegalArgumentException (() -> StringUtils .truncate (null , -1 ), "maxWidth cannot be negative" );
2955+ assertIllegalArgumentException (() -> StringUtils .truncate (null , -10 ), "maxWidth cannot be negative" );
2956+ assertIllegalArgumentException (() -> StringUtils .truncate (null , Integer .MIN_VALUE ), "maxWidth cannot be negative" );
29572957 assertEquals ("" , StringUtils .truncate ("" , 10 ));
29582958 assertEquals ("abc" , StringUtils .truncate ("abcdefghij" , 3 ));
29592959 assertEquals ("abcdef" , StringUtils .truncate ("abcdefghij" , 6 ));
29602960 assertEquals ("" , StringUtils .truncate ("abcdefghij" , 0 ));
2961- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -1 ), "maxWith cannot be negative" );
2962- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -100 ), "maxWith cannot be negative" );
2963- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , Integer .MIN_VALUE ), "maxWith cannot be negative" );
2961+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -1 ), "maxWidth cannot be negative" );
2962+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -100 ), "maxWidth cannot be negative" );
2963+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , Integer .MIN_VALUE ), "maxWidth cannot be negative" );
29642964 assertEquals ("abcdefghij" , StringUtils .truncate ("abcdefghijklmno" , 10 ));
29652965 assertEquals ("abcdefghijklmno" , StringUtils .truncate ("abcdefghijklmno" , Integer .MAX_VALUE ));
29662966 assertEquals ("abcde" , StringUtils .truncate ("abcdefghijklmno" , 5 ));
@@ -2979,11 +2979,11 @@ void testTruncate_StringIntInt() {
29792979 assertEquals ("abc" , StringUtils .truncate ("abcdefghij" , 0 , 3 ));
29802980 assertEquals ("fghij" , StringUtils .truncate ("abcdefghij" , 5 , 6 ));
29812981 assertEquals ("" , StringUtils .truncate ("abcdefghij" , 0 , 0 ));
2982- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , -1 ), "maxWith cannot be negative" );
2983- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , -10 ), "maxWith cannot be negative" );
2984- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , -100 ), "maxWith cannot be negative" );
2985- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 1 , -100 ), "maxWith cannot be negative" );
2986- assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , Integer .MIN_VALUE ), "maxWith cannot be negative" );
2982+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , -1 ), "maxWidth cannot be negative" );
2983+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , -10 ), "maxWidth cannot be negative" );
2984+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , -100 ), "maxWidth cannot be negative" );
2985+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 1 , -100 ), "maxWidth cannot be negative" );
2986+ assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , 0 , Integer .MIN_VALUE ), "maxWidth cannot be negative" );
29872987 assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -1 , 0 ), "offset cannot be negative" );
29882988 assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -10 , 0 ), "offset cannot be negative" );
29892989 assertIllegalArgumentException (() -> StringUtils .truncate ("abcdefghij" , -100 , 1 ), "offset cannot be negative" );
0 commit comments