MCPcopy
hub / github.com/cli/cli / ExtensionManagerMock

Struct ExtensionManagerMock

pkg/extensions/manager_mock.go:55–148  ·  view source on GitHub ↗

ExtensionManagerMock is a mock implementation of ExtensionManager. func TestSomethingThatUsesExtensionManager(t *testing.T) { // make and configure a mocked ExtensionManager mockedExtensionManager := &ExtensionManagerMock{ CreateFunc: func(name string, tmplType ExtTemplateType) error {

Source from the content-addressed store, hash-verified

53//
54// }
55type ExtensionManagerMock struct {
56 // CreateFunc mocks the Create method.
57 CreateFunc func(name string, tmplType ExtTemplateType) error
58
59 // DispatchFunc mocks the Dispatch method.
60 DispatchFunc func(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (bool, error)
61
62 // EnableDryRunModeFunc mocks the EnableDryRunMode method.
63 EnableDryRunModeFunc func()
64
65 // InstallFunc mocks the Install method.
66 InstallFunc func(interfaceMoqParam ghrepo.Interface, s string) error
67
68 // InstallLocalFunc mocks the InstallLocal method.
69 InstallLocalFunc func(dir string) error
70
71 // ListFunc mocks the List method.
72 ListFunc func() []Extension
73
74 // RemoveFunc mocks the Remove method.
75 RemoveFunc func(name string) error
76
77 // UpdateDirFunc mocks the UpdateDir method.
78 UpdateDirFunc func(name string) string
79
80 // UpgradeFunc mocks the Upgrade method.
81 UpgradeFunc func(name string, force bool) error
82
83 // calls tracks calls to the methods.
84 calls struct {
85 // Create holds details about calls to the Create method.
86 Create []struct {
87 // Name is the name argument value.
88 Name string
89 // TmplType is the tmplType argument value.
90 TmplType ExtTemplateType
91 }
92 // Dispatch holds details about calls to the Dispatch method.
93 Dispatch []struct {
94 // Args is the args argument value.
95 Args []string
96 // Stdin is the stdin argument value.
97 Stdin io.Reader
98 // Stdout is the stdout argument value.
99 Stdout io.Writer
100 // Stderr is the stderr argument value.
101 Stderr io.Writer
102 }
103 // EnableDryRunMode holds details about calls to the EnableDryRunMode method.
104 EnableDryRunMode []struct {
105 }
106 // Install holds details about calls to the Install method.
107 Install []struct {
108 // InterfaceMoqParam is the interfaceMoqParam argument value.
109 InterfaceMoqParam ghrepo.Interface
110 // S is the s argument value.
111 S string
112 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected