MCPcopy Create free account
hub / github.com/cli/cli / ArtifactClientMock

Struct ArtifactClientMock

pkg/cmd/issue/artifact/client/client_mock.go:48–149  ·  view source on GitHub ↗

ArtifactClientMock is a mock implementation of ArtifactClient. func TestSomethingThatUsesArtifactClient(t *testing.T) { // make and configure a mocked ArtifactClient mockedArtifactClient := &ArtifactClientMock{ CreateFunc: func(repo ghrepo.Interface, issueNumber int, artifactType string, n

Source from the content-addressed store, hash-verified

46//
47// }
48type ArtifactClientMock struct {
49 // CreateFunc mocks the Create method.
50 CreateFunc func(repo ghrepo.Interface, issueNumber int, artifactType string, name string, body string) (*Artifact, error)
51
52 // DeleteFunc mocks the Delete method.
53 DeleteFunc func(repo ghrepo.Interface, issueNumber int, number int) error
54
55 // GetFunc mocks the Get method.
56 GetFunc func(repo ghrepo.Interface, issueNumber int, number int) (*ArtifactWithVersions, error)
57
58 // IsPullRequestFunc mocks the IsPullRequest method.
59 IsPullRequestFunc func(repo ghrepo.Interface, number int) (bool, error)
60
61 // ListFunc mocks the List method.
62 ListFunc func(repo ghrepo.Interface, issueNumber int, artifactType string, limit int) ([]Artifact, error)
63
64 // UpdateFunc mocks the Update method.
65 UpdateFunc func(repo ghrepo.Interface, issueNumber int, number int, name *string, body *string) (*Artifact, error)
66
67 // UploadTargetFunc mocks the UploadTarget method.
68 UploadTargetFunc func(repo ghrepo.Interface, number int) (*UploadTarget, error)
69
70 // calls tracks calls to the methods.
71 calls struct {
72 // Create holds details about calls to the Create method.
73 Create []struct {
74 // Repo is the repo argument value.
75 Repo ghrepo.Interface
76 // IssueNumber is the issueNumber argument value.
77 IssueNumber int
78 // ArtifactType is the artifactType argument value.
79 ArtifactType string
80 // Name is the name argument value.
81 Name string
82 // Body is the body argument value.
83 Body string
84 }
85 // Delete holds details about calls to the Delete method.
86 Delete []struct {
87 // Repo is the repo argument value.
88 Repo ghrepo.Interface
89 // IssueNumber is the issueNumber argument value.
90 IssueNumber int
91 // Number is the number argument value.
92 Number int
93 }
94 // Get holds details about calls to the Get method.
95 Get []struct {
96 // Repo is the repo argument value.
97 Repo ghrepo.Interface
98 // IssueNumber is the issueNumber argument value.
99 IssueNumber int
100 // Number is the number argument value.
101 Number int
102 }
103 // IsPullRequest holds details about calls to the IsPullRequest method.
104 IsPullRequest []struct {
105 // Repo is the repo argument value.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected