Creating a unit test suite to unit test your workflows is unrelated to creating a mock client. You created a mock client and without setting any expectations on the mock tried to call something on it which is why you got “method was unexpected”. If you do expect that method, use the mock client to set those expectations. If you want to unit test the running workflow, that’s what the test suite is for, not for unit testing the calling of a workflow.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Testing http handler that executes a workflow | 2 | 688 | August 13, 2021 | |
| Test workflow was started | 4 | 637 | May 10, 2021 | |
| Testing entity workflow patter in Go SDK? | 7 | 1003 | February 7, 2022 | |
| Examples for using Client Mock | 2 | 3497 | June 15, 2022 | |
| Go-sdk: test setup - simulating a failed response from a `GetChildWorkflowExecution` call | 4 | 1006 | March 10, 2022 |