AddComment calls AddCommentFunc.
(repo ghrepo.Interface, discussionID string, body string, replyToID string)
| 250 | |
| 251 | // AddComment calls AddCommentFunc. |
| 252 | func (mock *DiscussionClientMock) AddComment(repo ghrepo.Interface, discussionID string, body string, replyToID string) (*DiscussionComment, error) { |
| 253 | if mock.AddCommentFunc == nil { |
| 254 | panic("DiscussionClientMock.AddCommentFunc: method is nil but DiscussionClient.AddComment was just called") |
| 255 | } |
| 256 | callInfo := struct { |
| 257 | Repo ghrepo.Interface |
| 258 | DiscussionID string |
| 259 | Body string |
| 260 | ReplyToID string |
| 261 | }{ |
| 262 | Repo: repo, |
| 263 | DiscussionID: discussionID, |
| 264 | Body: body, |
| 265 | ReplyToID: replyToID, |
| 266 | } |
| 267 | mock.lockAddComment.Lock() |
| 268 | mock.calls.AddComment = append(mock.calls.AddComment, callInfo) |
| 269 | mock.lockAddComment.Unlock() |
| 270 | return mock.AddCommentFunc(repo, discussionID, body, replyToID) |
| 271 | } |
| 272 | |
| 273 | // AddCommentCalls gets all the calls that were made to AddComment. |
| 274 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected