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

Change the PactMock DSL #246

Merged
merged 2 commits into from
Jan 4, 2025
Merged

Change the PactMock DSL #246

merged 2 commits into from
Jan 4, 2025

Conversation

ludorival
Copy link
Owner

  • Fixes Change the PactMock DSL  #241

  • Added clearPact and getCurrentPact methods to PactMock for better pact management.

  • Introduced state and anError utility functions for improved interaction handling.

  • Refactored interaction definitions in test contracts to use uponReceiving and withDescription for clarity and consistency.

  • Updated willRespondWith and related methods to streamline response handling in mock setups.

  • Improved README documentation to reflect changes in usage patterns with Mockk and Mockito.

These enhancements aim to simplify the mocking process and improve the overall usability of the pact-jvm-mock library.

- Fixes #241

- Added `clearPact` and `getCurrentPact` methods to `PactMock` for better pact management.
- Introduced `state` and `anError` utility functions for improved interaction handling.
- Refactored interaction definitions in test contracts to use `uponReceiving` and `withDescription` for clarity and consistency.
- Updated `willRespondWith` and related methods to streamline response handling in mock setups.
- Improved README documentation to reflect changes in usage patterns with Mockk and Mockito.

These enhancements aim to simplify the mocking process and improve the overall usability of the pact-jvm-mock library.
- Replaced `PactOptions` with `PactConfiguration` throughout the codebase for improved clarity and consistency in configuration management.
- Updated README documentation to reflect the new configuration approach and provide clearer examples.
- Modified the `PactConsumer` annotation to accept `PactConfiguration` types.
- Removed the obsolete `PactOptions` class and related methods, streamlining the pact management process.
- Enhanced test classes to utilize the new configuration structure, ensuring compatibility with existing tests.

These changes aim to simplify the configuration process and improve the overall usability of the pact-jvm-mock library.
@ludorival ludorival merged commit 9c7680b into main Jan 4, 2025
2 checks passed
@ludorival ludorival deleted the ludorival/issue241 branch January 4, 2025 17:41
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.

Change the PactMock DSL
1 participant