Commit 6387b15c authored by WinJ's avatar WinJ
Browse files

assertThrows simplified and lambda removed

parent f0c5d221
......@@ -38,8 +38,12 @@ public class CircularArrayFIFOQueueTests {
assertEquals(5, STUDENT_QUEUE.capacity());
// Checks to make sure the queue throws NoSuchElementException when calling peek or next
assertThrows(NoSuchElementException.class, STUDENT_QUEUE::peek);
assertThrows(NoSuchElementException.class, STUDENT_QUEUE::next);
assertThrows(NoSuchElementException.class, () -> {
STUDENT_QUEUE.peek();
});
assertThrows(NoSuchElementException.class, () -> {
STUDENT_QUEUE.next();
});
}
@Test()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment