Input calls InputFunc.
(prompt string, defaultValue string)
| 266 | |
| 267 | // Input calls InputFunc. |
| 268 | func (mock *PrompterMock) Input(prompt string, defaultValue string) (string, error) { |
| 269 | if mock.InputFunc == nil { |
| 270 | panic("PrompterMock.InputFunc: method is nil but Prompter.Input was just called") |
| 271 | } |
| 272 | callInfo := struct { |
| 273 | Prompt string |
| 274 | DefaultValue string |
| 275 | }{ |
| 276 | Prompt: prompt, |
| 277 | DefaultValue: defaultValue, |
| 278 | } |
| 279 | mock.lockInput.Lock() |
| 280 | mock.calls.Input = append(mock.calls.Input, callInfo) |
| 281 | mock.lockInput.Unlock() |
| 282 | return mock.InputFunc(prompt, defaultValue) |
| 283 | } |
| 284 | |
| 285 | // InputCalls gets all the calls that were made to Input. |
| 286 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected