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

Metamorph tests verify that no unexpected interactions occurred (first batch). #341

Merged
merged 7 commits into from
Nov 2, 2020

Conversation

blackwinter
Copy link
Member

Resolves #339.

Copy link
Member

@dr0i dr0i left a comment

Choose a reason for hiding this comment

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

I like this because it a) it shows the unintended behaviour and b) it's more concise.

@blackwinter
Copy link
Member Author

Thanks! Going forward, would you prefer a) this PR to encompass all test changes or b) individual PRs per "batch"?

@dr0i
Copy link
Member

dr0i commented Nov 2, 2020

Go with what's more convenient for you.

…ccurred in order.

* Added debug output for assertion errors.
* Silenced `MockitoHint`s in `LookupTest` (due to showing standard streams).
* Added `startEntity`/`endEntity` events where they were previously unverified.
* Didn't enable check for unverified interactions yet; `shouldHandleUnmatchedLiteralsAndEntitiesInElseNestedSource` doesn't pass.
* Removed redundant (?) `any()` literal verifications in `shouldMatchCharacterWithQuestionMarkWildcard` and `shouldMatchCharactersInCharacterClass`.
…ccurred at all.

* Changed `shouldHandleUnmatchedLiteralsAndEntitiesInElseNestedSource` to match actual behaviour (see #338).
…ccurred.

* Added `startRecord`/`endRecord` events where they were previously unverified.
@blackwinter blackwinter force-pushed the 339-metamorph-verify-no-more-interactions branch from bc2e29f to 7172a41 Compare November 2, 2020 14:40
@blackwinter
Copy link
Member Author

So this is the first batch. I'll create new PRs for the remaining Metamorph tests as time permits.

@blackwinter blackwinter marked this pull request as ready for review November 2, 2020 14:41
@blackwinter blackwinter requested a review from dr0i November 2, 2020 14:41
Copy link
Member

@dr0i dr0i left a comment

Choose a reason for hiding this comment

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

besides the one typo +1

@blackwinter blackwinter changed the title Metamorph verify no more interactions Metamorph tests verify that no unexpected interactions occurred (first batch). Nov 2, 2020
@blackwinter blackwinter force-pushed the 339-metamorph-verify-no-more-interactions branch from 7172a41 to 4b76491 Compare November 2, 2020 15:33
@blackwinter blackwinter merged commit 159f048 into master Nov 2, 2020
@blackwinter blackwinter deleted the 339-metamorph-verify-no-more-interactions branch November 2, 2020 16:09
@blackwinter
Copy link
Member Author

Note: In case of an unexpected interaction (Mockito assertion error), the newly introduced test helper (assertMorph()) prints both the expected events (via MockitoAssertionError in combination with Gradle setting exceptionFormat = 'full') and the actual events (via MockingDetails#printInvocations() in combination with Gradle setting showStandardStreams = true).

blackwinter added a commit that referenced this pull request Dec 13, 2024
Upgrade Gradle wrapper to version 8.6.
blackwinter added a commit that referenced this pull request Dec 13, 2024
Reverting Java 11 changes (3d8d0e5).
blackwinter added a commit that referenced this pull request Dec 13, 2024
Creating configurations with reserved names has been deprecated and will fail with an error in Gradle 9.0.

See: https://docs.gradle.org/8.6/userguide/building_java_projects.html#sec:implicit_sourceset_configurations
blackwinter added a commit that referenced this pull request Dec 13, 2024
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.

Metamorph tests should verify that no unexpected interactions occurred
2 participants