-
Notifications
You must be signed in to change notification settings - Fork 755
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
[Bug]: Cannot mock http:Client
by creating test double
#41821
Comments
I was able to reproduce the mentioned error with the following example.
|
The issue occurs when you try to return the record directly as follows. But if you assign it to a variable and return, this error can be avoided.
@niveathika Until we fix the issue can you use it as a workaround? |
Ack. I will use this workaround for the time being |
Faced a similar issue when mocking an http:Client with a |
Closing this since a workaround is provided. |
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description
The code given in https://ballerina.io/learn/test-ballerina-code/mocking/#create-a-test-double is not working.
The above results in
This results in following error,
Steps to Reproduce
No response
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Test Framework
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: