MultiSelect calls MultiSelectFunc.
(prompt string, defaults []string, options []string)
| 369 | |
| 370 | // MultiSelect calls MultiSelectFunc. |
| 371 | func (mock *PrompterMock) MultiSelect(prompt string, defaults []string, options []string) ([]int, error) { |
| 372 | if mock.MultiSelectFunc == nil { |
| 373 | panic("PrompterMock.MultiSelectFunc: method is nil but Prompter.MultiSelect was just called") |
| 374 | } |
| 375 | callInfo := struct { |
| 376 | Prompt string |
| 377 | Defaults []string |
| 378 | Options []string |
| 379 | }{ |
| 380 | Prompt: prompt, |
| 381 | Defaults: defaults, |
| 382 | Options: options, |
| 383 | } |
| 384 | mock.lockMultiSelect.Lock() |
| 385 | mock.calls.MultiSelect = append(mock.calls.MultiSelect, callInfo) |
| 386 | mock.lockMultiSelect.Unlock() |
| 387 | return mock.MultiSelectFunc(prompt, defaults, options) |
| 388 | } |
| 389 | |
| 390 | // MultiSelectCalls gets all the calls that were made to MultiSelect. |
| 391 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected