test: linked list remove
This commit is contained in:
@@ -47,4 +47,18 @@ public class CustomLinkedListTest {
|
||||
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvSource({
|
||||
"'Tak, jsme, to, cele, totalne, dosrali, ale, co, uz', 'totalne'"
|
||||
})
|
||||
void cllRemove_shouldRemoveItemSuccessfully(@ConvertWith(StringArrayConverter.class) String[] data, String toRemove) {
|
||||
CustomLinkedList<String> list = new CustomLinkedListImpl<>();
|
||||
|
||||
Stream.of(data).forEach(list::add);
|
||||
|
||||
list.remove(toRemove);
|
||||
|
||||
assertThat(list.contains(toRemove)).isFalse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user