| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import mock "github.com/stretchr/testify/mock" |
| |
| // Port is an autogenerated mock type for the Port type |
| type Port struct { |
| mock.Mock |
| } |
| |
| // Close provides a mock function with given fields: |
| func (_m *Port) Close() error { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Close") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func() error); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Flush provides a mock function with given fields: |
| func (_m *Port) Flush() error { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Flush") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func() error); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Read provides a mock function with given fields: b |
| func (_m *Port) Read(b []byte) (int, error) { |
| ret := _m.Called(b) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Read") |
| } |
| |
| var r0 int |
| var r1 error |
| if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok { |
| return rf(b) |
| } |
| if rf, ok := ret.Get(0).(func([]byte) int); ok { |
| r0 = rf(b) |
| } else { |
| r0 = ret.Get(0).(int) |
| } |
| |
| if rf, ok := ret.Get(1).(func([]byte) error); ok { |
| r1 = rf(b) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Write provides a mock function with given fields: b |
| func (_m *Port) Write(b []byte) (int, error) { |
| ret := _m.Called(b) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Write") |
| } |
| |
| var r0 int |
| var r1 error |
| if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok { |
| return rf(b) |
| } |
| if rf, ok := ret.Get(0).(func([]byte) int); ok { |
| r0 = rf(b) |
| } else { |
| r0 = ret.Get(0).(int) |
| } |
| |
| if rf, ok := ret.Get(1).(func([]byte) error); ok { |
| r1 = rf(b) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewPort creates a new instance of Port. 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 NewPort(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *Port { |
| mock := &Port{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |