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:
Hans Joachim Desserud
2015-09-12 15:03:41 +02:00
parent c39c3cfdae
commit fb85fb5b76

View File

@@ -62,6 +62,7 @@ public class DependencyVersionTest {
public void testIterator() {
DependencyVersion instance = new DependencyVersion("1.2.3");
Iterator result = instance.iterator();
assertTrue(result.hasNext());
int count = 1;
while (result.hasNext()) {
String v = (String) result.next();