CIActivity.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// NewCIActivity creates a new instance of CIActivity. 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 NewCIActivity(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *CIActivity {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &CIActivity{}
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// CIActivity is an autogenerated mock type for the CIActivity type
38type CIActivity struct {
39 mock.Mock
40}
41
42type CIActivity_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *CIActivity) EXPECT() *CIActivity_Expecter {
47 return &CIActivity_Expecter{mock: &_m.Mock}
48}
49
50// Settled provides a mock function for the type CIActivity
51func (_mock *CIActivity) Settled(ctx context.Context, repo domain.RepoName, number int64) bool {
52 ret := _mock.Called(ctx, repo, number)
53
54 if len(ret) == 0 {
55 panic("no return value specified for Settled")
56 }
57
58 var r0 bool
59 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64) bool); ok {
60 r0 = returnFunc(ctx, repo, number)
61 } else {
62 r0 = ret.Get(0).(bool)
63 }
64 return r0
65}
66
67// CIActivity_Settled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Settled'
68type CIActivity_Settled_Call struct {
69 *mock.Call
70}
71
72// Settled is a helper method to define mock.On call
73// - ctx context.Context
74// - repo domain.RepoName
75// - number int64
76func (_e *CIActivity_Expecter) Settled(ctx any, repo any, number any) *CIActivity_Settled_Call {
77 return &CIActivity_Settled_Call{Call: _e.mock.On("Settled", ctx, repo, number)}
78}
79
80func (_c *CIActivity_Settled_Call) Run(run func(ctx context.Context, repo domain.RepoName, number int64)) *CIActivity_Settled_Call {
81 _c.Call.Run(func(args mock.Arguments) {
82 var arg0 context.Context
83 if args[0] != nil {
84 arg0 = args[0].(context.Context)
85 }
86 var arg1 domain.RepoName
87 if args[1] != nil {
88 arg1 = args[1].(domain.RepoName)
89 }
90 var arg2 int64
91 if args[2] != nil {
92 arg2 = args[2].(int64)
93 }
94 run(
95 arg0,
96 arg1,
97 arg2,
98 )
99 })
100 return _c
101}
102
103func (_c *CIActivity_Settled_Call) Return(b bool) *CIActivity_Settled_Call {
104 _c.Call.Return(b)
105 return _c
106}
107
108func (_c *CIActivity_Settled_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, number int64) bool) *CIActivity_Settled_Call {
109 _c.Call.Return(run)
110 return _c
111}