Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COLLECTIONS-758] Add test cases for AbstractQueueDecorator #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dota17
Copy link
Contributor

@dota17 dota17 commented Nov 11, 2019

No description provided.

@garydgregory
Copy link
Member

What is the new class prefixed with a "T"?

@dota17 dota17 changed the title Add test cases for AbstractQueueDecorator [COLLECTIONS-758] Add test cases for AbstractQueueDecorator Apr 1, 2020
@dota17
Copy link
Contributor Author

dota17 commented Apr 29, 2020

What is the new class prefixed with a "T"?

It's an instance of AbstractQueueDecorator. I had changed it.


@Override
public Collection<E> makeConfirmedCollection() {
final ArrayList<E> list = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local var is useless, you can remove it.

try {
getCollection().remove();
fail("Queue.remove should throw NoSuchElementException");
} catch (final NoSuchElementException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use JUnit 5's assertThrows() in new tests.


try {
getCollection().element();
fail("Queue.remove should throw NoSuchElementException");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use JUnit 5's assertThrows() in new tests.

@coveralls
Copy link

coveralls commented May 6, 2020

Coverage Status

Coverage remained the same at 90.123% when pulling 888b618 on dota17:collections-queue into a3eb3be on apache:master.

@dota17 dota17 requested a review from garydgregory May 7, 2020 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants