27 |
|
import java.util.Arrays; |
28 |
|
import java.util.Date; |
29 |
|
import java.util.Enumeration; |
30 |
+ |
import java.util.Iterator; |
31 |
|
import java.util.List; |
32 |
|
import java.util.NoSuchElementException; |
33 |
|
import java.util.PropertyPermission; |
1469 |
|
shouldThrow(expectedExceptionClass.getName()); |
1470 |
|
} |
1471 |
|
} |
1472 |
+ |
|
1473 |
+ |
public void assertIteratorExhausted(Iterator<?> it) { |
1474 |
+ |
try { |
1475 |
+ |
it.next(); |
1476 |
+ |
shouldThrow(); |
1477 |
+ |
} catch (NoSuchElementException success) {} |
1478 |
+ |
assertFalse(it.hasNext()); |
1479 |
+ |
} |
1480 |
|
} |