Password calls PasswordFunc.
(prompt string)
| 457 | |
| 458 | // Password calls PasswordFunc. |
| 459 | func (mock *PrompterMock) Password(prompt string) (string, error) { |
| 460 | if mock.PasswordFunc == nil { |
| 461 | panic("PrompterMock.PasswordFunc: method is nil but Prompter.Password was just called") |
| 462 | } |
| 463 | callInfo := struct { |
| 464 | Prompt string |
| 465 | }{ |
| 466 | Prompt: prompt, |
| 467 | } |
| 468 | mock.lockPassword.Lock() |
| 469 | mock.calls.Password = append(mock.calls.Password, callInfo) |
| 470 | mock.lockPassword.Unlock() |
| 471 | return mock.PasswordFunc(prompt) |
| 472 | } |
| 473 | |
| 474 | // PasswordCalls gets all the calls that were made to Password. |
| 475 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected