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

How to allow ExpectSet multitimes/Anytimes? #42

Open
cwsbobwang opened this issue Oct 17, 2022 · 2 comments
Open

How to allow ExpectSet multitimes/Anytimes? #42

cwsbobwang opened this issue Oct 17, 2022 · 2 comments

Comments

@cwsbobwang
Copy link

Sometimes, it's not care about the times of call ExpectActions, how to allow it anytimes?

@SteveFromAccounting
Copy link

SteveFromAccounting commented Nov 14, 2022

Curious about this as well. It seems like this functionality isn't implemented, looking at the struct here? Or did I just miss something?

The way I'm currently going about it is to always ensure I have the correct number of calls to an expected function, which means sometimes copy/pasting or putting an expectation in a loop, like so:

for i := 0; i < 5; i++ {
  // this is expected to be called 5 times
  redisClientMock.ExpectGet(myRedisKeys.TestKey).SetVal("true")
}

@adibaulia
Copy link

Looking forward to this feature. No requirement to anticipate the expiration time duration since my tested function computes the expired key's duration. Any updates available?

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

No branches or pull requests

3 participants