ConfigMock is a mock implementation of gh.Config. func TestSomethingThatUsesConfig(t *testing.T) { // make and configure a mocked gh.Config mockedConfig := &ConfigMock{ AccessibleColorsFunc: func(hostname string) gh.ConfigEntry { panic("mock out the AccessibleColors method") }, A
| 87 | // |
| 88 | // } |
| 89 | type ConfigMock struct { |
| 90 | // AccessibleColorsFunc mocks the AccessibleColors method. |
| 91 | AccessibleColorsFunc func(hostname string) gh.ConfigEntry |
| 92 | |
| 93 | // AccessiblePrompterFunc mocks the AccessiblePrompter method. |
| 94 | AccessiblePrompterFunc func(hostname string) gh.ConfigEntry |
| 95 | |
| 96 | // AliasesFunc mocks the Aliases method. |
| 97 | AliasesFunc func() gh.AliasConfig |
| 98 | |
| 99 | // AuthenticationFunc mocks the Authentication method. |
| 100 | AuthenticationFunc func() gh.AuthConfig |
| 101 | |
| 102 | // BrowserFunc mocks the Browser method. |
| 103 | BrowserFunc func(hostname string) gh.ConfigEntry |
| 104 | |
| 105 | // CacheDirFunc mocks the CacheDir method. |
| 106 | CacheDirFunc func() string |
| 107 | |
| 108 | // ColorLabelsFunc mocks the ColorLabels method. |
| 109 | ColorLabelsFunc func(hostname string) gh.ConfigEntry |
| 110 | |
| 111 | // EditorFunc mocks the Editor method. |
| 112 | EditorFunc func(hostname string) gh.ConfigEntry |
| 113 | |
| 114 | // GetOrDefaultFunc mocks the GetOrDefault method. |
| 115 | GetOrDefaultFunc func(hostname string, key string) o.Option[gh.ConfigEntry] |
| 116 | |
| 117 | // GitProtocolFunc mocks the GitProtocol method. |
| 118 | GitProtocolFunc func(hostname string) gh.ConfigEntry |
| 119 | |
| 120 | // HTTPUnixSocketFunc mocks the HTTPUnixSocket method. |
| 121 | HTTPUnixSocketFunc func(hostname string) gh.ConfigEntry |
| 122 | |
| 123 | // MigrateFunc mocks the Migrate method. |
| 124 | MigrateFunc func(migration gh.Migration) error |
| 125 | |
| 126 | // PagerFunc mocks the Pager method. |
| 127 | PagerFunc func(hostname string) gh.ConfigEntry |
| 128 | |
| 129 | // PreferEditorPromptFunc mocks the PreferEditorPrompt method. |
| 130 | PreferEditorPromptFunc func(hostname string) gh.ConfigEntry |
| 131 | |
| 132 | // PromptFunc mocks the Prompt method. |
| 133 | PromptFunc func(hostname string) gh.ConfigEntry |
| 134 | |
| 135 | // SetFunc mocks the Set method. |
| 136 | SetFunc func(hostname string, key string, value string) |
| 137 | |
| 138 | // SpinnerFunc mocks the Spinner method. |
| 139 | SpinnerFunc func(hostname string) gh.ConfigEntry |
| 140 | |
| 141 | // TelemetryFunc mocks the Telemetry method. |
| 142 | TelemetryFunc func() gh.ConfigEntry |
| 143 | |
| 144 | // VersionFunc mocks the Version method. |
| 145 | VersionFunc func() o.Option[string] |
| 146 |
nothing calls this directly
no outgoing calls
no test coverage detected