CommitSigner.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "bnema.dev/ermite/internal/domain"
9 mock "github.com/stretchr/testify/mock"
10)
11
12// NewCommitSigner creates a new instance of CommitSigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func NewCommitSigner(t interface {
15 mock.TestingT
16 Cleanup(func())
17}) *CommitSigner {
18 if helper, ok := t.(interface{ Helper() }); ok {
19 helper.Helper()
20 }
21
22 mock := &CommitSigner{}
23 mock.Mock.Test(t)
24
25 t.Cleanup(func() {
26 if helper, ok := t.(interface{ Helper() }); ok {
27 helper.Helper()
28 }
29 mock.AssertExpectations(t)
30 })
31
32 return mock
33}
34
35// CommitSigner is an autogenerated mock type for the CommitSigner type
36type CommitSigner struct {
37 mock.Mock
38}
39
40type CommitSigner_Expecter struct {
41 mock *mock.Mock
42}
43
44func (_m *CommitSigner) EXPECT() *CommitSigner_Expecter {
45 return &CommitSigner_Expecter{mock: &_m.Mock}
46}
47
48// PublicKey provides a mock function for the type CommitSigner
49func (_mock *CommitSigner) PublicKey() domain.SigningPublicKey {
50 ret := _mock.Called()
51
52 if len(ret) == 0 {
53 panic("no return value specified for PublicKey")
54 }
55
56 var r0 domain.SigningPublicKey
57 if returnFunc, ok := ret.Get(0).(func() domain.SigningPublicKey); ok {
58 r0 = returnFunc()
59 } else {
60 r0 = ret.Get(0).(domain.SigningPublicKey)
61 }
62 return r0
63}
64
65// CommitSigner_PublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicKey'
66type CommitSigner_PublicKey_Call struct {
67 *mock.Call
68}
69
70// PublicKey is a helper method to define mock.On call
71func (_e *CommitSigner_Expecter) PublicKey() *CommitSigner_PublicKey_Call {
72 return &CommitSigner_PublicKey_Call{Call: _e.mock.On("PublicKey")}
73}
74
75func (_c *CommitSigner_PublicKey_Call) Run(run func()) *CommitSigner_PublicKey_Call {
76 _c.Call.Run(func(args mock.Arguments) {
77 run()
78 })
79 return _c
80}
81
82func (_c *CommitSigner_PublicKey_Call) Return(signingPublicKey domain.SigningPublicKey) *CommitSigner_PublicKey_Call {
83 _c.Call.Return(signingPublicKey)
84 return _c
85}
86
87func (_c *CommitSigner_PublicKey_Call) RunAndReturn(run func() domain.SigningPublicKey) *CommitSigner_PublicKey_Call {
88 _c.Call.Return(run)
89 return _c
90}
91
92// Sign provides a mock function for the type CommitSigner
93func (_mock *CommitSigner) Sign(payload []byte) (string, error) {
94 ret := _mock.Called(payload)
95
96 if len(ret) == 0 {
97 panic("no return value specified for Sign")
98 }
99
100 var r0 string
101 var r1 error
102 if returnFunc, ok := ret.Get(0).(func([]byte) (string, error)); ok {
103 return returnFunc(payload)
104 }
105 if returnFunc, ok := ret.Get(0).(func([]byte) string); ok {
106 r0 = returnFunc(payload)
107 } else {
108 r0 = ret.Get(0).(string)
109 }
110 if returnFunc, ok := ret.Get(1).(func([]byte) error); ok {
111 r1 = returnFunc(payload)
112 } else {
113 r1 = ret.Error(1)
114 }
115 return r0, r1
116}
117
118// CommitSigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign'
119type CommitSigner_Sign_Call struct {
120 *mock.Call
121}
122
123// Sign is a helper method to define mock.On call
124// - payload []byte
125func (_e *CommitSigner_Expecter) Sign(payload any) *CommitSigner_Sign_Call {
126 return &CommitSigner_Sign_Call{Call: _e.mock.On("Sign", payload)}
127}
128
129func (_c *CommitSigner_Sign_Call) Run(run func(payload []byte)) *CommitSigner_Sign_Call {
130 _c.Call.Run(func(args mock.Arguments) {
131 var arg0 []byte
132 if args[0] != nil {
133 arg0 = args[0].([]byte)
134 }
135 run(
136 arg0,
137 )
138 })
139 return _c
140}
141
142func (_c *CommitSigner_Sign_Call) Return(s string, err error) *CommitSigner_Sign_Call {
143 _c.Call.Return(s, err)
144 return _c
145}
146
147func (_c *CommitSigner_Sign_Call) RunAndReturn(run func(payload []byte) (string, error)) *CommitSigner_Sign_Call {
148 _c.Call.Return(run)
149 return _c
150}