-
Notifications
You must be signed in to change notification settings - Fork 60
feat(#206): Adds diff mode as annotation #207
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
Conversation
|
||
if (isAnnotated(annotatedElement, HoverflyValidate.class)) { | ||
final HoverflyValidate hoverflyValidate = annotatedElement.getAnnotation(HoverflyValidate.class); | ||
hoverfly.assertThatNoDiffIsReported(hoverflyValidate.reset()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the assertion is failed, it will not proceed to shut down hoverfly. I think the assertion should be wrap in the following try... finally...
block as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AfterAll
callback is always called, even in case of exception, so Hoverfly is closed there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern was that hoverfly.assertThatNoDiffIsReported
in the AfterAll
callback throws an AssertionError
which is not in the try-finally block. So it stops the execution of the succeeding code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right sorry I just fixed my eyes in one part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries :)
junit5/src/main/java/io/specto/hoverfly/junit5/HoverflyExtension.java
Outdated
Show resolved
Hide resolved
@tommysitu I think everything is addressed now. |
@tommysitu Now :) |
Looks good! |
Any plan to release soon? I'd like to write about it on my next blog post. |
Nothing else is pending, we can do a release tomorrow. Just being curious, what's your next blog about? |
About hoverfly/service virtualization and java |
👍 Look forward to it! |
No description provided.