Using buffered boundary stream in multipart parser. But currently not working
This commit is contained in:
parent
53dec4603c
commit
077963ae28
11 changed files with 198 additions and 152 deletions
|
|
@ -83,19 +83,16 @@ public class CircularBufferTest {
|
|||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected = NoSuchElementException.class)
|
||||
public void iteratorEmpty() {
|
||||
CircularBuffer<Integer> buff = new CircularBuffer<Integer>(10);
|
||||
Iterator<Integer> it = buff.iterator();
|
||||
|
||||
assert (!it.hasNext());
|
||||
try {
|
||||
it.next();
|
||||
fail("NoSuchElementException was not thrown");
|
||||
} catch (NoSuchElementException e) {}
|
||||
it.next(); // Exception
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected = NoSuchElementException.class)
|
||||
public void iteratorThreeElements() {
|
||||
CircularBuffer<Integer> buff = new CircularBuffer<Integer>(10);
|
||||
buff.add(10);
|
||||
|
|
@ -111,9 +108,6 @@ public class CircularBufferTest {
|
|||
assertEquals((Integer) 10, it.next());
|
||||
assert (!it.hasNext());
|
||||
|
||||
try {
|
||||
it.next();
|
||||
fail("NoSuchElementException was not thrown");
|
||||
} catch (NoSuchElementException e) {}
|
||||
it.next(); // Exception
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue