MCPcopy
hub / github.com/cli/cli / DiscussionClientMock

Struct DiscussionClientMock

pkg/cmd/discussion/client/client_mock.go:69–249  ·  view source on GitHub ↗

DiscussionClientMock is a mock implementation of DiscussionClient. func TestSomethingThatUsesDiscussionClient(t *testing.T) { // make and configure a mocked DiscussionClient mockedDiscussionClient := &DiscussionClientMock{ AddCommentFunc: func(repo ghrepo.Interface, discussionID string, bo

Source from the content-addressed store, hash-verified

67//
68// }
69type DiscussionClientMock struct {
70 // AddCommentFunc mocks the AddComment method.
71 AddCommentFunc func(repo ghrepo.Interface, discussionID string, body string, replyToID string) (*DiscussionComment, error)
72
73 // CreateFunc mocks the Create method.
74 CreateFunc func(repo ghrepo.Interface, input CreateDiscussionInput) (*Discussion, error)
75
76 // DeleteCommentFunc mocks the DeleteComment method.
77 DeleteCommentFunc func(repo ghrepo.Interface, commentID string) error
78
79 // GetByNumberFunc mocks the GetByNumber method.
80 GetByNumberFunc func(repo ghrepo.Interface, number int32) (*Discussion, error)
81
82 // GetCommentFunc mocks the GetComment method.
83 GetCommentFunc func(host string, commentID string) (*DiscussionComment, error)
84
85 // GetCommentRepliesFunc mocks the GetCommentReplies method.
86 GetCommentRepliesFunc func(host string, commentID string, limit int, after string, newest bool) (*Discussion, error)
87
88 // GetWithCommentsFunc mocks the GetWithComments method.
89 GetWithCommentsFunc func(repo ghrepo.Interface, number int32, commentLimit int, after string, newest bool) (*Discussion, error)
90
91 // ListFunc mocks the List method.
92 ListFunc func(repo ghrepo.Interface, filters ListFilters, after string, limit int) (*DiscussionListResult, error)
93
94 // ListCategoriesFunc mocks the ListCategories method.
95 ListCategoriesFunc func(repo ghrepo.Interface) ([]DiscussionCategory, error)
96
97 // ListLabelsFunc mocks the ListLabels method.
98 ListLabelsFunc func(repo ghrepo.Interface) ([]DiscussionLabel, error)
99
100 // ResolveCommentNodeIDFunc mocks the ResolveCommentNodeID method.
101 ResolveCommentNodeIDFunc func(repo ghrepo.Interface, commentDatabaseID int64) (string, error)
102
103 // SearchFunc mocks the Search method.
104 SearchFunc func(repo ghrepo.Interface, filters SearchFilters, after string, limit int) (*DiscussionListResult, error)
105
106 // UpdateFunc mocks the Update method.
107 UpdateFunc func(repo ghrepo.Interface, input UpdateDiscussionInput) (*Discussion, error)
108
109 // UpdateCommentFunc mocks the UpdateComment method.
110 UpdateCommentFunc func(repo ghrepo.Interface, commentID string, body string) (*DiscussionComment, error)
111
112 // calls tracks calls to the methods.
113 calls struct {
114 // AddComment holds details about calls to the AddComment method.
115 AddComment []struct {
116 // Repo is the repo argument value.
117 Repo ghrepo.Interface
118 // DiscussionID is the discussionID argument value.
119 DiscussionID string
120 // Body is the body argument value.
121 Body string
122 // ReplyToID is the replyToID argument value.
123 ReplyToID string
124 }
125 // Create holds details about calls to the Create method.
126 Create []struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected