mock_connFactoryFunc.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Code generated by mockery v2.13.1. DO NOT EDIT.
  2. package cluster
  3. import (
  4. aerospike "github.com/aerospike/aerospike-client-go/v6"
  5. mock "github.com/stretchr/testify/mock"
  6. )
  7. // mockConnFactoryFunc is an autogenerated mock type for the connFactoryFunc type
  8. type mockConnFactoryFunc struct {
  9. mock.Mock
  10. }
  11. // Execute provides a mock function with given fields: _a0, _a1
  12. func (_m *mockConnFactoryFunc) Execute(_a0 *aerospike.ClientPolicy, _a1 *aerospike.Host) (asconn, aerospike.Error) {
  13. ret := _m.Called(_a0, _a1)
  14. var r0 asconn
  15. if rf, ok := ret.Get(0).(func(*aerospike.ClientPolicy, *aerospike.Host) asconn); ok {
  16. r0 = rf(_a0, _a1)
  17. } else {
  18. if ret.Get(0) != nil {
  19. r0 = ret.Get(0).(asconn)
  20. }
  21. }
  22. var r1 aerospike.Error
  23. if rf, ok := ret.Get(1).(func(*aerospike.ClientPolicy, *aerospike.Host) aerospike.Error); ok {
  24. r1 = rf(_a0, _a1)
  25. } else {
  26. if ret.Get(1) != nil {
  27. r1 = ret.Get(1).(aerospike.Error)
  28. }
  29. }
  30. return r0, r1
  31. }
  32. type mockConstructorTestingTnewMockConnFactoryFunc interface {
  33. mock.TestingT
  34. Cleanup(func())
  35. }
  36. // newMockConnFactoryFunc creates a new instance of mockConnFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  37. func newMockConnFactoryFunc(t mockConstructorTestingTnewMockConnFactoryFunc) *mockConnFactoryFunc {
  38. mock := &mockConnFactoryFunc{}
  39. mock.Mock.Test(t)
  40. t.Cleanup(func() { mock.AssertExpectations(t) })
  41. return mock
  42. }