Closed Thevakumar-Luheerathan closed 4 weeks ago
Please refer https://github.com/ballerina-platform/ballerina-lang/issues/42037#issuecomment-1918688306 for the explanation of the behaviour.
Workaround:
Move the import statement for the ballerina/test
dependency above the import statement for the dependency that's being mocked.
Workaround is provided. Hence closing.
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.
- Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
- Reason/Regression - The issue has introduced a regression.
- Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
- Reason/Complex - Issue occurred due to complex scenario.
- Reason/Invalid - Issue is invalid.
- Reason/Other - None of the above cases.
Description
Following bad sad error occurs when I try to mock final client in a different module
Steps to Reproduce
1) Create new project as
bal new -t main test2
2) Add a new module asbal add dao
3) Add following content to a source file(may bedao.bal
) indao
module.4) Add following code to a test file(may be
main_test.bal
) of the default module5) Execute
bal test
Affected Version(s)
2201.8.0 and may be lower versions as well
OS, DB, other environment details and versions
No response
Related area
-> Test Framework
Related issue(s) (optional)
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response