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

[+] implement ExpectReset() function and tests, closes #146 #148

Merged
merged 8 commits into from
Aug 17, 2023

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 16, 2023

Description

This PR implements the ExpectReset() function in the pgxmock package and adds tests to cover the new code. The ExpectReset() function allows users to queue an expectation for the Reset() action to be triggered. The ExpectedReset type is defined in the expectations.go file, similar to other expectation types like ExpectedClose and ExpectedBegin. The implementation of the ExpectReset() function is done in the pgxmock.go file. Tests for the new function are added in the pgxmock_test.go file.

Summary of Changes

  • Added ExpectedReset type in expectations.go file.
  • Implemented ExpectReset() function in pgxmock.go file.
  • Added tests for the ExpectReset() function in pgxmock_test.go file.

Fixes #146.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/implement-expect-reset

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 16, 2023
@pashagolub
Copy link
Owner

add ExpectClose() function type to pgxMockIface interface

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Aug 16, 2023

add ExpectClose() function type to pgxMockIface interface
Hi @pashagolub,

I decided to make the following changes:

File Path Proposed Changes
pgxmock.go Modify pgxmock.go with contents:
* Add ExpectClose() *ExpectedClose to the pgxMockIface interface.

@pashagolub
Copy link
Owner

remove ExpectedReset's implementation of functions:

  • fulfilled() bool
  • Lock()
  • Unlock()

@pashagolub pashagolub self-assigned this Aug 17, 2023
@pashagolub pashagolub added the enhancement New feature or request label Aug 17, 2023
@pashagolub pashagolub changed the title Implement ExpectReset() function and tests [+] implement ExpectReset() function and tests, closes #146 Aug 17, 2023
@pashagolub pashagolub merged commit 19a4aaf into master Aug 17, 2023
3 checks passed
@pashagolub pashagolub deleted the sweep/implement-expect-reset branch August 17, 2023 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: implement func (c *pgxmock) ExpectReset() *ExpectedReset
1 participant