github.com/datastax/go-cassandra-native-protocol@v0.0.0-20220706104457-5e8aad05cf90/datacodec/mock_injector_test.go (about) 1 // Code generated by mockery v2.12.3. DO NOT EDIT. 2 3 package datacodec 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // mockInjector is an autogenerated mock type for the injector type 8 type mockInjector struct { 9 mock.Mock 10 } 11 12 // setElem provides a mock function with given fields: index, key, value, keyWasNull, valueWasNull 13 func (_m *mockInjector) setElem(index int, key interface{}, value interface{}, keyWasNull bool, valueWasNull bool) error { 14 ret := _m.Called(index, key, value, keyWasNull, valueWasNull) 15 16 var r0 error 17 if rf, ok := ret.Get(0).(func(int, interface{}, interface{}, bool, bool) error); ok { 18 r0 = rf(index, key, value, keyWasNull, valueWasNull) 19 } else { 20 r0 = ret.Error(0) 21 } 22 23 return r0 24 } 25 26 // zeroElem provides a mock function with given fields: index, key 27 func (_m *mockInjector) zeroElem(index int, key interface{}) (interface{}, error) { 28 ret := _m.Called(index, key) 29 30 var r0 interface{} 31 if rf, ok := ret.Get(0).(func(int, interface{}) interface{}); ok { 32 r0 = rf(index, key) 33 } else { 34 if ret.Get(0) != nil { 35 r0 = ret.Get(0).(interface{}) 36 } 37 } 38 39 var r1 error 40 if rf, ok := ret.Get(1).(func(int, interface{}) error); ok { 41 r1 = rf(index, key) 42 } else { 43 r1 = ret.Error(1) 44 } 45 46 return r0, r1 47 } 48 49 type newMockInjectorT interface { 50 mock.TestingT 51 Cleanup(func()) 52 } 53 54 // newMockInjector creates a new instance of mockInjector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 55 func newMockInjector(t newMockInjectorT) *mockInjector { 56 mock := &mockInjector{} 57 mock.Mock.Test(t) 58 59 t.Cleanup(func() { mock.AssertExpectations(t) }) 60 61 return mock 62 }