// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewCommitSigner(t interface { mock.TestingT Cleanup(func()) }) *CommitSigner { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CommitSigner{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CommitSigner is an autogenerated mock type for the CommitSigner type type CommitSigner struct { mock.Mock } type CommitSigner_Expecter struct { mock *mock.Mock } func (_m *CommitSigner) EXPECT() *CommitSigner_Expecter { return &CommitSigner_Expecter{mock: &_m.Mock} } // PublicKey provides a mock function for the type CommitSigner func (_mock *CommitSigner) PublicKey() domain.SigningPublicKey { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for PublicKey") } var r0 domain.SigningPublicKey if returnFunc, ok := ret.Get(0).(func() domain.SigningPublicKey); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(domain.SigningPublicKey) } return r0 } // CommitSigner_PublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicKey' type CommitSigner_PublicKey_Call struct { *mock.Call } // PublicKey is a helper method to define mock.On call func (_e *CommitSigner_Expecter) PublicKey() *CommitSigner_PublicKey_Call { return &CommitSigner_PublicKey_Call{Call: _e.mock.On("PublicKey")} } func (_c *CommitSigner_PublicKey_Call) Run(run func()) *CommitSigner_PublicKey_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *CommitSigner_PublicKey_Call) Return(signingPublicKey domain.SigningPublicKey) *CommitSigner_PublicKey_Call { _c.Call.Return(signingPublicKey) return _c } func (_c *CommitSigner_PublicKey_Call) RunAndReturn(run func() domain.SigningPublicKey) *CommitSigner_PublicKey_Call { _c.Call.Return(run) return _c } // Sign provides a mock function for the type CommitSigner func (_mock *CommitSigner) Sign(payload []byte) (string, error) { ret := _mock.Called(payload) if len(ret) == 0 { panic("no return value specified for Sign") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func([]byte) (string, error)); ok { return returnFunc(payload) } if returnFunc, ok := ret.Get(0).(func([]byte) string); ok { r0 = returnFunc(payload) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func([]byte) error); ok { r1 = returnFunc(payload) } else { r1 = ret.Error(1) } return r0, r1 } // CommitSigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' type CommitSigner_Sign_Call struct { *mock.Call } // Sign is a helper method to define mock.On call // - payload []byte func (_e *CommitSigner_Expecter) Sign(payload any) *CommitSigner_Sign_Call { return &CommitSigner_Sign_Call{Call: _e.mock.On("Sign", payload)} } func (_c *CommitSigner_Sign_Call) Run(run func(payload []byte)) *CommitSigner_Sign_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 []byte if args[0] != nil { arg0 = args[0].([]byte) } run( arg0, ) }) return _c } func (_c *CommitSigner_Sign_Call) Return(s string, err error) *CommitSigner_Sign_Call { _c.Call.Return(s, err) return _c } func (_c *CommitSigner_Sign_Call) RunAndReturn(run func(payload []byte) (string, error)) *CommitSigner_Sign_Call { _c.Call.Return(run) return _c }