github.com/datastax/go-cassandra-native-protocol@v0.0.0-20220706104457-5e8aad05cf90/datacodec/mock_key_value_extractor_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 // mockKeyValueExtractor is an autogenerated mock type for the keyValueExtractor type 8 type mockKeyValueExtractor struct { 9 mock.Mock 10 } 11 12 // getElem provides a mock function with given fields: index, key 13 func (_m *mockKeyValueExtractor) getElem(index int, key interface{}) (interface{}, error) { 14 ret := _m.Called(index, key) 15 16 var r0 interface{} 17 if rf, ok := ret.Get(0).(func(int, interface{}) interface{}); ok { 18 r0 = rf(index, key) 19 } else { 20 if ret.Get(0) != nil { 21 r0 = ret.Get(0).(interface{}) 22 } 23 } 24 25 var r1 error 26 if rf, ok := ret.Get(1).(func(int, interface{}) error); ok { 27 r1 = rf(index, key) 28 } else { 29 r1 = ret.Error(1) 30 } 31 32 return r0, r1 33 } 34 35 // getKey provides a mock function with given fields: index 36 func (_m *mockKeyValueExtractor) getKey(index int) interface{} { 37 ret := _m.Called(index) 38 39 var r0 interface{} 40 if rf, ok := ret.Get(0).(func(int) interface{}); ok { 41 r0 = rf(index) 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).(interface{}) 45 } 46 } 47 48 return r0 49 } 50 51 type newMockKeyValueExtractorT interface { 52 mock.TestingT 53 Cleanup(func()) 54 } 55 56 // newMockKeyValueExtractor creates a new instance of mockKeyValueExtractor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 57 func newMockKeyValueExtractor(t newMockKeyValueExtractorT) *mockKeyValueExtractor { 58 mock := &mockKeyValueExtractor{} 59 mock.Mock.Test(t) 60 61 t.Cleanup(func() { mock.AssertExpectations(t) }) 62 63 return mock 64 }