Skip to content

Commit ef98fc4

Browse files
committed
Better test assertions
1 parent a9baf80 commit ef98fc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/apache/commons/cli/OptionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ void testBuilderMethods() {
211211
@Test
212212
void testClear() {
213213
final TestOption option = new TestOption("x", true, "");
214-
assertEquals(0, option.getValuesList().size());
214+
assertTrue(option.getValuesList().isEmpty());
215215
option.addValue("a");
216216
assertEquals(1, option.getValuesList().size());
217217
option.clearValues();
218-
assertEquals(0, option.getValuesList().size());
218+
assertTrue(option.getValuesList().isEmpty());
219219
}
220220

221221
// See https://issues.apache.org/jira/browse/CLI-21
@@ -231,7 +231,7 @@ void testClone() {
231231
b.addValue("b1");
232232
b.addValue("b2");
233233
assertEquals(1, a.getArgs());
234-
assertEquals(0, a.getValuesList().size());
234+
assertTrue(a.getValuesList().isEmpty());
235235
assertEquals(2, b.getValues().length);
236236
}
237237

0 commit comments

Comments
 (0)