Skip to content

Remove Guava and use JUnit assert - #170

Merged
jtigger merged 3 commits into
exercism:masterfrom
alebaffa:remove_3rd_libs
Nov 13, 2016
Merged

jtigger merged 3 commits into
exercism:masterfrom
alebaffa:remove_3rd_libs

Conversation

@alebaffa

@alebaffa alebaffa commented Nov 7, 2016

Copy link
Copy Markdown

As described in issue #168, I removed the dependency from Guava library in order to use Collections.unmodifiableMap from the standard library. The last test case is longer than before, but at least now all the test cases are written coherently and so they are easier to understand.

Also, I noticed that this exercise was using the Guava assertions assertJ. So I removed it and used the standard assertEquals from JUnit (though, I could have used the Hamcrest library for the assertThat, or the assertThat from JUnit + a matcher from Hamcrest. Let me know if you prefer that way for the assertion instead of the standard assertEqual).

@jtigger jtigger 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.

Appreciate your cleaning this up, @alebaffa.

Note that Collections.unmodifiable...() returns a read-only view; the result must be reassigned to old for it to take effect.

@alebaffa

Copy link
Copy Markdown
Author

Done.

@jtigger jtigger 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.

I see the same issue with expected as well.

The test code in Exercism is the dominant aspect of the experience. It is read/used a lot. So the bar is particularly high, here.

@alebaffa

Copy link
Copy Markdown
Author

Done. Sorry!

@jtigger jtigger 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.

Thanks for adjusting!

@jtigger
jtigger merged commit 912013d into exercism:master Nov 13, 2016
@alebaffa

Copy link
Copy Markdown
Author

awesome! Thanks @jtigger

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.

2 participants