Skip to content
Snippets Groups Projects
Commit 6387b15c authored by WinJ's avatar WinJ
Browse files

assertThrows simplified and lambda removed

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