// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package ffmpeg import ( mock "github.com/stretchr/testify/mock" ) // NewMockIOWriter creates a new instance of MockIOWriter. 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 NewMockIOWriter(t interface { mock.TestingT Cleanup(func()) }) *MockIOWriter { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockIOWriter{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockIOWriter is an autogenerated mock type for the Writer type type MockIOWriter struct { mock.Mock } type MockIOWriter_Expecter struct { mock *mock.Mock } func (_m *MockIOWriter) EXPECT() *MockIOWriter_Expecter { return &MockIOWriter_Expecter{mock: &_m.Mock} } // Write provides a mock function for the type MockIOWriter func (_mock *MockIOWriter) Write(p []byte) (int, error) { ret := _mock.Called(p) if len(ret) == 0 { panic("no return value specified for Write") } var r0 int var r1 error if returnFunc, ok := ret.Get(0).(func([]byte) (int, error)); ok { return returnFunc(p) } if returnFunc, ok := ret.Get(0).(func([]byte) int); ok { r0 = returnFunc(p) } else { r0 = ret.Get(0).(int) } if returnFunc, ok := ret.Get(1).(func([]byte) error); ok { r1 = returnFunc(p) } else { r1 = ret.Error(1) } return r0, r1 } // MockIOWriter_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write' type MockIOWriter_Write_Call struct { *mock.Call } // Write is a helper method to define mock.On call // - p []byte func (_e *MockIOWriter_Expecter) Write(p any) *MockIOWriter_Write_Call { return &MockIOWriter_Write_Call{Call: _e.mock.On("Write", p)} } func (_c *MockIOWriter_Write_Call) Run(run func(p []byte)) *MockIOWriter_Write_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 *MockIOWriter_Write_Call) Return(n int, err error) *MockIOWriter_Write_Call { _c.Call.Return(n, err) return _c } func (_c *MockIOWriter_Write_Call) RunAndReturn(run func(p []byte) (int, error)) *MockIOWriter_Write_Call { _c.Call.Return(run) return _c }