Skip to content

Commit ce417d5

Browse files
committed
add test ensuring that isNotEmpty(...) is the negation of isEmpty(...)
1 parent 54c611f commit ce417d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/java/org/codehaus/plexus/util/xml/Xpp3DomUtilsTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@ public void testOverwriteDominantBlankValue() throws XmlPullParserException, IOE
127127
assertEquals( " ", mergeResult.getValue() );
128128
}
129129

130+
@Test
131+
public void testIsNotEmptyNegatesIsEmpty()
132+
{
133+
assertEquals( !Xpp3DomUtils.isEmpty( null ), Xpp3DomUtils.isNotEmpty( null ) );
134+
assertEquals( !Xpp3DomUtils.isEmpty( "" ), Xpp3DomUtils.isNotEmpty( "" ) );
135+
assertEquals( !Xpp3DomUtils.isEmpty( " " ), Xpp3DomUtils.isNotEmpty( " " ) );
136+
assertEquals( !Xpp3DomUtils.isEmpty( "someValue" ), Xpp3DomUtils.isNotEmpty( "someValue" ) );
137+
}
138+
130139
private static class FixedInputLocationBuilder
131140
implements Xpp3DomBuilder.InputLocationBuilder
132141
{

0 commit comments

Comments
 (0)