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

Mocking, dependency update, assertj #140

Merged
merged 9 commits into from
Sep 2, 2014
Merged

Conversation

hazendaz
Copy link
Member

@hazendaz hazendaz commented Sep 1, 2014

Mock third party implementations used in tests. Specifically in Shiro and Tomcat for now. Will review others in due time.

Added assertj to better write tests comparing results. Drop in replacement for hamcrest and eventually will replace any hamcrest usage with this.

Minor sonar cleanup.

Updated spring3/4 and tomcat 8.

Updated release date in change log to be sometime in September.

For more fluent assertions which also allow for increasing code coverage
on unit tests themselves by avoiding conditionals.  Test dependency only
which completely replaces hamcrest.  Will work in everywhere hamcrest is
currently used as time permits.
Minor regression on sonar results.
Change all test cases to make sue of mocking thus removing all but
needed items for waffle.  This makes intent clearer and might ultimately
lead to a solution of test cases that can apply to all versions.  At the
very least, it decreases code quite a bit that is essentially no more
than noise.  Uses mockito and powermock as needed.
Eclipse source formatting and some extra javadoc information.
Remove all non implemented items leaving tomcat portions as abstract
then using mockito to mock them.  This makes it much more clear as to
what waffle is actually using to perform tests as the vast majority of
tomcat fields are not needed.
Mocking tomcat so it is clear as to what waffle is actually using for
tests.
Use mocking so it is clear as to what waffle actually needs for testing.
Notes about mocking changes and minor cleanup.
@dblock
Copy link
Collaborator

dblock commented Sep 2, 2014

Mich better, re: mocks.

dblock added a commit that referenced this pull request Sep 2, 2014
Mocking, dependency update, assertj
@dblock dblock merged commit 3d6f0f9 into Waffle:master Sep 2, 2014
@hazendaz
Copy link
Member Author

hazendaz commented Sep 2, 2014

Thank you! I got the idea a week or so back when I realized I could Mock abstract classes and call out methods to test. Makes for a much cleaner test setup with waffle for sure :) Probably will cleanup even further in that area as I get a chance. I see some things such as external setup that can just be internal as no need to really call out setters in most cases. Really depends on coverage. If further changes don’t reduce coverage, then I will go for it. Ultimately, I would like to get this library coverage up as far as possible. I know in some cases that s chasing the coverage numbers but I have learned that doing so also ends up ultimately flushing out code that can be refactored. Already seen some areas in waffle-jna that can be refactored. So coverage first, then start in on some refactoring probably in 1.8 stream.

Jeremy

From: Daniel Doubrovkine (dB.) @dblockdotorg [mailto:[email protected]]
Sent: Monday, September 01, 2014 8:03 PM
To: dblock/waffle
Cc: Jeremy Landis
Subject: Re: [waffle] Mocking, dependency update, assertj (#140)

Mich better, re: mocks.


Reply to this email directly or view it on GitHub #140 (comment) . https://github.com/notifications/beacon/975267__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNTIzNTM3NywiZGF0YSI6eyJpZCI6NDEyNDE2OTl9fQ==--9f19962993e422932d748eaf2d3cc55571916043.gif

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