github.com/argoproj/argo-cd/v2@v2.10.9/applicationset/services/pull_request/fake.go (about) 1 package pull_request 2 3 import ( 4 "context" 5 ) 6 7 type FakeService struct { 8 listPullReuests []*PullRequest 9 listError error 10 } 11 12 var _ PullRequestService = (*FakeService)(nil) 13 14 func NewFakeService(_ context.Context, listPullReuests []*PullRequest, listError error) (PullRequestService, error) { 15 return &FakeService{ 16 listPullReuests: listPullReuests, 17 listError: listError, 18 }, nil 19 } 20 21 func (g *FakeService) List(ctx context.Context) ([]*PullRequest, error) { 22 return g.listPullReuests, g.listError 23 }