Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
p1-public
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cse332-22sp
p1-public
Commits
6387b15c
Commit
6387b15c
authored
3 years ago
by
WinJ
Browse files
Options
Downloads
Patches
Plain Diff
assertThrows simplified and lambda removed
parent
f0c5d221
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/ckpt1/CircularArrayFIFOQueueTests.java
+6
-2
6 additions, 2 deletions
src/test/java/ckpt1/CircularArrayFIFOQueueTests.java
with
6 additions
and
2 deletions
src/test/java/ckpt1/CircularArrayFIFOQueueTests.java
+
6
−
2
View file @
6387b15c
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment