// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package ui import ( "context" mock "github.com/stretchr/testify/mock" ) // NewMockAsyncClipboard creates a new instance of MockAsyncClipboard. 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 NewMockAsyncClipboard(t interface { mock.TestingT Cleanup(func()) }) *MockAsyncClipboard { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockAsyncClipboard{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockAsyncClipboard is an autogenerated mock type for the AsyncClipboard type type MockAsyncClipboard struct { mock.Mock } type MockAsyncClipboard_Expecter struct { mock *mock.Mock } func (_m *MockAsyncClipboard) EXPECT() *MockAsyncClipboard_Expecter { return &MockAsyncClipboard_Expecter{mock: &_m.Mock} } // ReadTextAsync provides a mock function for the type MockAsyncClipboard func (_mock *MockAsyncClipboard) ReadTextAsync(ctx context.Context, limit int, deliver func([]byte, error)) error { ret := _mock.Called(ctx, limit, deliver) if len(ret) == 0 { panic("no return value specified for ReadTextAsync") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, func([]byte, error)) error); ok { r0 = returnFunc(ctx, limit, deliver) } else { r0 = ret.Error(0) } return r0 } // MockAsyncClipboard_ReadTextAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadTextAsync' type MockAsyncClipboard_ReadTextAsync_Call struct { *mock.Call } // ReadTextAsync is a helper method to define mock.On call // - ctx context.Context // - limit int // - deliver func([]byte, error) func (_e *MockAsyncClipboard_Expecter) ReadTextAsync(ctx any, limit any, deliver any) *MockAsyncClipboard_ReadTextAsync_Call { return &MockAsyncClipboard_ReadTextAsync_Call{Call: _e.mock.On("ReadTextAsync", ctx, limit, deliver)} } func (_c *MockAsyncClipboard_ReadTextAsync_Call) Run(run func(ctx context.Context, limit int, deliver func([]byte, error))) *MockAsyncClipboard_ReadTextAsync_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 func([]byte, error) if args[2] != nil { arg2 = args[2].(func([]byte, error)) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockAsyncClipboard_ReadTextAsync_Call) Return(err error) *MockAsyncClipboard_ReadTextAsync_Call { _c.Call.Return(err) return _c } func (_c *MockAsyncClipboard_ReadTextAsync_Call) RunAndReturn(run func(ctx context.Context, limit int, deliver func([]byte, error)) error) *MockAsyncClipboard_ReadTextAsync_Call { _c.Call.Return(run) return _c } // WriteText provides a mock function for the type MockAsyncClipboard func (_mock *MockAsyncClipboard) WriteText(bytes []byte) error { ret := _mock.Called(bytes) if len(ret) == 0 { panic("no return value specified for WriteText") } var r0 error if returnFunc, ok := ret.Get(0).(func([]byte) error); ok { r0 = returnFunc(bytes) } else { r0 = ret.Error(0) } return r0 } // MockAsyncClipboard_WriteText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteText' type MockAsyncClipboard_WriteText_Call struct { *mock.Call } // WriteText is a helper method to define mock.On call // - bytes []byte func (_e *MockAsyncClipboard_Expecter) WriteText(bytes any) *MockAsyncClipboard_WriteText_Call { return &MockAsyncClipboard_WriteText_Call{Call: _e.mock.On("WriteText", bytes)} } func (_c *MockAsyncClipboard_WriteText_Call) Run(run func(bytes []byte)) *MockAsyncClipboard_WriteText_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 *MockAsyncClipboard_WriteText_Call) Return(err error) *MockAsyncClipboard_WriteText_Call { _c.Call.Return(err) return _c } func (_c *MockAsyncClipboard_WriteText_Call) RunAndReturn(run func(bytes []byte) error) *MockAsyncClipboard_WriteText_Call { _c.Call.Return(run) return _c }