Skip to content

Commit a7c7845

Browse files
committed
Add test for unsupported remove method
1 parent 919ec00 commit a7c7845

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/org/nibor/autolink/LinkExtractorIterableTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public void nextThrowsNoSuchElementException() {
3535
iterator.next();
3636
}
3737

38+
@Test(expected = UnsupportedOperationException.class)
39+
public void removeUnsupported() {
40+
Iterable<LinkSpan> iterable = getSingleElementIterable();
41+
iterable.iterator().remove();
42+
}
43+
3844
private Iterable<LinkSpan> getSingleElementIterable() {
3945
String input = "foo http://example.com";
4046
return LinkExtractor.builder().build().extractLinks(input);

0 commit comments

Comments
 (0)