WorkflowTrigger.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "bnema.dev/ermite/internal/domain"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// NewWorkflowTrigger creates a new instance of WorkflowTrigger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewWorkflowTrigger(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *WorkflowTrigger {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &WorkflowTrigger{}
25 mock.Mock.Test(t)
26
27 t.Cleanup(func() {
28 if helper, ok := t.(interface{ Helper() }); ok {
29 helper.Helper()
30 }
31 mock.AssertExpectations(t)
32 })
33
34 return mock
35}
36
37// WorkflowTrigger is an autogenerated mock type for the WorkflowTrigger type
38type WorkflowTrigger struct {
39 mock.Mock
40}
41
42type WorkflowTrigger_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *WorkflowTrigger) EXPECT() *WorkflowTrigger_Expecter {
47 return &WorkflowTrigger_Expecter{mock: &_m.Mock}
48}
49
50// OnPush provides a mock function for the type WorkflowTrigger
51func (_mock *WorkflowTrigger) OnPush(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal) {
52 _mock.Called(ctx, repo, updates, pusher)
53 return
54}
55
56// WorkflowTrigger_OnPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnPush'
57type WorkflowTrigger_OnPush_Call struct {
58 *mock.Call
59}
60
61// OnPush is a helper method to define mock.On call
62// - ctx context.Context
63// - repo domain.RepoName
64// - updates []domain.RefUpdate
65// - pusher domain.Principal
66func (_e *WorkflowTrigger_Expecter) OnPush(ctx any, repo any, updates any, pusher any) *WorkflowTrigger_OnPush_Call {
67 return &WorkflowTrigger_OnPush_Call{Call: _e.mock.On("OnPush", ctx, repo, updates, pusher)}
68}
69
70func (_c *WorkflowTrigger_OnPush_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal)) *WorkflowTrigger_OnPush_Call {
71 _c.Call.Run(func(args mock.Arguments) {
72 var arg0 context.Context
73 if args[0] != nil {
74 arg0 = args[0].(context.Context)
75 }
76 var arg1 domain.RepoName
77 if args[1] != nil {
78 arg1 = args[1].(domain.RepoName)
79 }
80 var arg2 []domain.RefUpdate
81 if args[2] != nil {
82 arg2 = args[2].([]domain.RefUpdate)
83 }
84 var arg3 domain.Principal
85 if args[3] != nil {
86 arg3 = args[3].(domain.Principal)
87 }
88 run(
89 arg0,
90 arg1,
91 arg2,
92 arg3,
93 )
94 })
95 return _c
96}
97
98func (_c *WorkflowTrigger_OnPush_Call) Return() *WorkflowTrigger_OnPush_Call {
99 _c.Call.Return()
100 return _c
101}
102
103func (_c *WorkflowTrigger_OnPush_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal)) *WorkflowTrigger_OnPush_Call {
104 _c.Run(run)
105 return _c
106}