@Test public void hasLengthWithRange() { assert Strings.hasLength("XXX", 0); assert Strings.hasLength("XXX", 1); assert Strings.hasLength("XXX", 2); assert Strings.hasLength("XXX", 3); assert !Strings.hasLength("XXX", 4); }
@Test public void hasLengthWithTrim() { assert !Strings.hasLength(" ", 1, true); }
@Test public void hasLengthOnNotEmpty() { assert Strings.hasLength("X", 1); }
@Test public void hasLengthOnEmpty() { assert Strings.hasLength("", 0); }
@Test public void hasLengthOnNull() { assert !Strings.hasLength(null, 0); }
@Test(expected = AssertionError.class) public void hasLengthAssertions() { Strings.hasLength(null, -1); }