@@ -140,19 +140,21 @@ public void testTrimTrailingCharacter() {
140
140
141
141
@ Test
142
142
public void testStartsWithIgnoreCase () {
143
- String suffix = "fOo" ;
144
- assertTrue (StringUtils .startsWithIgnoreCase ("foo" , suffix ));
145
- assertTrue (StringUtils .startsWithIgnoreCase ("Foo" , suffix ));
146
- assertTrue (StringUtils .startsWithIgnoreCase ("foobar" , suffix ));
147
- assertTrue (StringUtils .startsWithIgnoreCase ("foobarbar" , suffix ));
148
- assertTrue (StringUtils .startsWithIgnoreCase ("Foobar" , suffix ));
149
- assertTrue (StringUtils .startsWithIgnoreCase ("FoobarBar" , suffix ));
150
- assertTrue (StringUtils .startsWithIgnoreCase ("foObar" , suffix ));
151
- assertTrue (StringUtils .startsWithIgnoreCase ("FOObar" , suffix ));
152
- assertTrue (StringUtils .startsWithIgnoreCase ("fOobar" , suffix ));
153
- assertFalse (StringUtils .startsWithIgnoreCase (null , suffix ));
143
+ String prefix = "fOo" ;
144
+ assertTrue (StringUtils .startsWithIgnoreCase ("foo" , prefix ));
145
+ assertTrue (StringUtils .startsWithIgnoreCase ("Foo" , prefix ));
146
+ assertTrue (StringUtils .startsWithIgnoreCase ("foobar" , prefix ));
147
+ assertTrue (StringUtils .startsWithIgnoreCase ("foobarbar" , prefix ));
148
+ assertTrue (StringUtils .startsWithIgnoreCase ("Foobar" , prefix ));
149
+ assertTrue (StringUtils .startsWithIgnoreCase ("FoobarBar" , prefix ));
150
+ assertTrue (StringUtils .startsWithIgnoreCase ("foObar" , prefix ));
151
+ assertTrue (StringUtils .startsWithIgnoreCase ("FOObar" , prefix ));
152
+ assertTrue (StringUtils .startsWithIgnoreCase ("fOobar" , prefix ));
153
+ assertFalse (StringUtils .startsWithIgnoreCase (null , prefix ));
154
154
assertFalse (StringUtils .startsWithIgnoreCase ("fOobar" , null ));
155
- assertFalse (StringUtils .startsWithIgnoreCase ("b" , suffix ));
155
+ assertFalse (StringUtils .startsWithIgnoreCase ("b" , prefix ));
156
+ assertFalse (StringUtils .startsWithIgnoreCase ("barfoo" , prefix ));
157
+ assertFalse (StringUtils .startsWithIgnoreCase ("barfoobar" , prefix ));
156
158
}
157
159
158
160
@ Test
@@ -170,6 +172,8 @@ public void testEndsWithIgnoreCase() {
170
172
assertFalse (StringUtils .endsWithIgnoreCase (null , suffix ));
171
173
assertFalse (StringUtils .endsWithIgnoreCase ("barfOo" , null ));
172
174
assertFalse (StringUtils .endsWithIgnoreCase ("b" , suffix ));
175
+ assertFalse (StringUtils .endsWithIgnoreCase ("foobar" , suffix ));
176
+ assertFalse (StringUtils .endsWithIgnoreCase ("barfoobar" , suffix ));
173
177
}
174
178
175
179
@ Test
0 commit comments