Create calls CreateFunc.
(repo ghrepo.Interface, issueNumber int, artifactType string, name string, body string)
| 150 | |
| 151 | // Create calls CreateFunc. |
| 152 | func (mock *ArtifactClientMock) Create(repo ghrepo.Interface, issueNumber int, artifactType string, name string, body string) (*Artifact, error) { |
| 153 | if mock.CreateFunc == nil { |
| 154 | panic("ArtifactClientMock.CreateFunc: method is nil but ArtifactClient.Create was just called") |
| 155 | } |
| 156 | callInfo := struct { |
| 157 | Repo ghrepo.Interface |
| 158 | IssueNumber int |
| 159 | ArtifactType string |
| 160 | Name string |
| 161 | Body string |
| 162 | }{ |
| 163 | Repo: repo, |
| 164 | IssueNumber: issueNumber, |
| 165 | ArtifactType: artifactType, |
| 166 | Name: name, |
| 167 | Body: body, |
| 168 | } |
| 169 | mock.lockCreate.Lock() |
| 170 | mock.calls.Create = append(mock.calls.Create, callInfo) |
| 171 | mock.lockCreate.Unlock() |
| 172 | return mock.CreateFunc(repo, issueNumber, artifactType, name, body) |
| 173 | } |
| 174 | |
| 175 | // CreateCalls gets all the calls that were made to Create. |
| 176 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected