mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 16:49:43 +01:00
Ensure that we assert something. If the iterator doesn't have any values we would never enter the loop, but the test would still be green
This commit is contained in:
@@ -62,6 +62,7 @@ public class DependencyVersionTest {
|
|||||||
public void testIterator() {
|
public void testIterator() {
|
||||||
DependencyVersion instance = new DependencyVersion("1.2.3");
|
DependencyVersion instance = new DependencyVersion("1.2.3");
|
||||||
Iterator result = instance.iterator();
|
Iterator result = instance.iterator();
|
||||||
|
assertTrue(result.hasNext());
|
||||||
int count = 1;
|
int count = 1;
|
||||||
while (result.hasNext()) {
|
while (result.hasNext()) {
|
||||||
String v = (String) result.next();
|
String v = (String) result.next();
|
||||||
|
|||||||
Reference in New Issue
Block a user