Lines Matching refs:peek
115 peekingIterator.peek();
116 fail("Should throw NoSuchElementException if nothing to peek()");
126 assertEquals("Should be able to peek() at first element",
127 "A", peekingIterator.peek());
128 assertEquals("Should be able to peek() first element multiple times",
129 "A", peekingIterator.peek());
133 assertEquals("Should be able to peek() at middle element",
134 "B", peekingIterator.peek());
135 assertEquals("Should be able to peek() middle element multiple times",
136 "B", peekingIterator.peek());
140 assertEquals("Should be able to peek() at last element",
141 "C", peekingIterator.peek());
142 assertEquals("Should be able to peek() last element multiple times",
143 "C", peekingIterator.peek());
148 peekingIterator.peek();
149 fail("Should throw exception if no next to peek()");
152 peekingIterator.peek();
153 fail("Should continue to throw exception if no next to peek()");
167 assertEquals("B", peekingIterator.peek());
169 /* Should complain on attempt to remove() after peek(). */
172 fail("remove() should throw IllegalStateException after a peek()");
175 assertEquals("After remove() throws exception, peek should still be ok",
176 "B", peekingIterator.peek());