88import static org .hamcrest .AbstractMatcherTest .assertUnknownTypeSafe ;
99import static org .hamcrest .text .IsEmptyString .emptyOrNullString ;
1010import static org .hamcrest .text .IsEmptyString .emptyString ;
11- import static org .hamcrest .text .IsEmptyString .blankString ;
1211
1312import org .hamcrest .Matcher ;
1413import org .junit .Test ;
@@ -17,7 +16,7 @@ public final class IsEmptyStringTest {
1716
1817 @ Test public void
1918 copesWithNullsAndUnknownTypes () {
20- Matcher <String > matcher = emptyOrNullString ();
19+ Matcher <String > matcher = emptyString ();
2120
2221 assertNullSafe (matcher );
2322 assertUnknownTypeSafe (matcher );
@@ -27,41 +26,35 @@ public final class IsEmptyStringTest {
2726 matchesEmptyString () {
2827 assertMatches ("didn't match" , emptyOrNullString (), "" );
2928 assertMatches ("didn't match" , emptyString (), "" );
30- assertMatches ("didn't match" , blankString (), "" );
3129 }
3230
3331 @ Test public void
3432 matchesNullAppropriately () {
3533 assertMatches ("didn't match" , emptyOrNullString (), null );
3634 assertDoesNotMatch ("matched unexpectedly" , emptyString (), null );
37- assertDoesNotMatch ("matched unexpectedly" , blankString (), null );
3835 }
3936
4037 @ Test public void
4138 matchesBlankStringAppropriately () {
42- assertMatches ("didn't match" , blankString (), " " );
4339 assertDoesNotMatch ("matched unexpectedly" , emptyString (), " " );
4440 assertDoesNotMatch ("matched unexpectedly" , emptyOrNullString (), " " );
4541 }
4642
4743 @ Test public void
4844 doesNotMatchFilledString () {
4945 assertDoesNotMatch ("matched unexpectedly" , emptyString (), "a" );
50- assertDoesNotMatch ("matched unexpectedly" , blankString (), "a" );
5146 assertDoesNotMatch ("matched unexpectedly" , emptyOrNullString (), "a" );
5247 }
5348
5449 @ Test public void
5550 describesItself () {
5651 assertDescription ("an empty string" , emptyString ());
57- assertDescription ("a blank string" , blankString ());
5852 assertDescription ("(null or an empty string)" , emptyOrNullString ());
5953 }
6054
6155 @ Test public void
6256 describesAMismatch () {
6357 assertMismatchDescription ("was \" a\" " , emptyString (), "a" );
64- assertMismatchDescription ("was \" a\" " , blankString (), "a" );
6558 assertMismatchDescription ("was \" a\" " , emptyOrNullString (), "a" );
6659 }
6760}
0 commit comments