Skip to content

Changes assertThat to assertEquals - #1591

Merged
sjwarner-bp merged 2 commits into
exercism:masterfrom
AndresAcuna:SchoolChanges
Oct 6, 2018
Merged

sjwarner-bp merged 2 commits into
exercism:masterfrom
AndresAcuna:SchoolChanges

Conversation

@AndresAcuna

Copy link
Copy Markdown
Contributor

Reviewer Resources:

Track Policies

@FridaTveit FridaTveit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, thanks @AndresAcuna! 😄 There's one whitespace missing and some unused imports that can be removed, apart from that it looks ready to merge! 🙂

school.add("Aimee", 2);
List<String> expected = Arrays.asList("Aimee");
assertThat(school.roster(), is(expected));
assertEquals(expected,school.roster());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There should be a space here between expected and school.roster() 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

all done

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think quite a few of these imports aren't needed any more? Feel free to remove them as part of this PR (ctrl + alt + O should remove unused imports using IntelliJ, see https://www.jetbrains.com/help/phpstorm/optimizing-imports.html), or I can open a new issue for it if you'd prefer 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I took care of it, I also removed some redundant initializations (of school) in every test since it's already done in @Before.

@sjwarner-bp sjwarner-bp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great! Thanks so much @AndresAcuna

@sjwarner-bp
sjwarner-bp merged commit d5c9f6d into exercism:master Oct 6, 2018
@AndresAcuna
AndresAcuna deleted the SchoolChanges branch October 10, 2018 04:00
ErikSchierboom pushed a commit to ErikSchierboom/java that referenced this pull request Jan 26, 2021
ErikSchierboom pushed a commit to ErikSchierboom/java that referenced this pull request Jan 27, 2021
ErikSchierboom pushed a commit to ErikSchierboom/java that referenced this pull request Jan 28, 2021
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