mockRuntime implements runtime.Runtime for testing the CLI runner. It emits pre-configured events from RunStream and records Resume calls.
| 22 | // mockRuntime implements runtime.Runtime for testing the CLI runner. |
| 23 | // It emits pre-configured events from RunStream and records Resume calls. |
| 24 | type mockRuntime struct { |
| 25 | events []runtime.Event |
| 26 | |
| 27 | mu sync.Mutex |
| 28 | resumes []runtime.ResumeRequest |
| 29 | elicitationDeclines int |
| 30 | elicitationLastAction tools.ElicitationAction |
| 31 | } |
| 32 | |
| 33 | // mockRuntimeWithOverrides extends mockRuntime to allow method overriding for testing |
| 34 | type mockRuntimeWithOverrides struct { |
nothing calls this directly
no outgoing calls
no test coverage detected