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

MockMaker API cleanup #1868

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Conversation

AndreasTu
Copy link
Member

@AndreasTu AndreasTu commented Jan 23, 2024

Moved MockMakerId to spock.mock package.
Added release notes for mock maker feature.

Try to ease flaky InvokingMocksFromMultipleThreads spec

PollingConditions change: Fix failing test when tests are executed with non english locale.
The formatting of the elapsedTime would not match the pattern in the test.

@AndreasTu AndreasTu requested a review from leonard84 January 23, 2024 18:38
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (c6c1768) 80.38% compared to head (dfc4a2c) 80.44%.

Files Patch % Lines
...ock-core/src/main/java/spock/mock/MockMakerId.java 81.25% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1868      +/-   ##
============================================
+ Coverage     80.38%   80.44%   +0.06%     
- Complexity     4316     4335      +19     
============================================
  Files           439      441       +2     
  Lines         13518    13529      +11     
  Branches       1709     1705       -4     
============================================
+ Hits          10867    10884      +17     
+ Misses         2011     2007       -4     
+ Partials        640      638       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* @param id the mock maker ID.
* @return the settings object
*/
static IMockMakerSettings simple(MockMakerId id) {
Copy link
Member

Choose a reason for hiding this comment

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

Thinking some more about it, I'm not happy with the simple name.
It suggests that we are configuring some kind of simple mock maker.
Maybe a forId or builtIn would be more precise. Or, we should lift the anonymous class to a top-level named IdOnlySettings and remove the static method here, as we don't want users to use this method directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ich have changed the name to settingsFor().

spock-core/src/main/java/spock/mock/MockMakerId.java Outdated Show resolved Hide resolved
Moved MockMakerId to spock.mock package.
Added release notes for mock maker feature.

Try to ease flaky InvokingMocksFromMultipleThreads spec

PollingConditions change: Fix failing test when tests are executed with non english locale.
The formatting of the elapsedTime would not match the pattern in the test.

Co-authored-by: Leonard Brünings <[email protected]>
@leonard84 leonard84 merged commit dd798eb into spockframework:master Jan 24, 2024
23 checks passed
@AndreasTu AndreasTu deleted the MockitoCleanup branch January 24, 2024 18:21
@AndreasTu AndreasTu added this to the 2.4 milestone Feb 18, 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.

2 participants