mock_nodeFactoryFunc.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. // mockNodeFactoryFunc is an autogenerated mock type for the nodeFactoryFunc type
  8. type mockNodeFactoryFunc struct {
  9. mock.Mock
  10. }
  11. // Execute provides a mock function with given fields: _a0, _a1, _a2
  12. func (_m *mockNodeFactoryFunc) Execute(_a0 *aerospike.ClientPolicy, _a1 *aerospike.Host, _a2 bool) (Node, error) {
  13. ret := _m.Called(_a0, _a1, _a2)
  14. var r0 Node
  15. if rf, ok := ret.Get(0).(func(*aerospike.ClientPolicy, *aerospike.Host, bool) Node); ok {
  16. r0 = rf(_a0, _a1, _a2)
  17. } else {
  18. if ret.Get(0) != nil {
  19. r0 = ret.Get(0).(Node)
  20. }
  21. }
  22. var r1 error
  23. if rf, ok := ret.Get(1).(func(*aerospike.ClientPolicy, *aerospike.Host, bool) error); ok {
  24. r1 = rf(_a0, _a1, _a2)
  25. } else {
  26. r1 = ret.Error(1)
  27. }
  28. return r0, r1
  29. }
  30. type mockConstructorTestingTnewMockNodeFactoryFunc interface {
  31. mock.TestingT
  32. Cleanup(func())
  33. }
  34. // newMockNodeFactoryFunc creates a new instance of mockNodeFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  35. func newMockNodeFactoryFunc(t mockConstructorTestingTnewMockNodeFactoryFunc) *mockNodeFactoryFunc {
  36. mock := &mockNodeFactoryFunc{}
  37. mock.Mock.Test(t)
  38. t.Cleanup(func() { mock.AssertExpectations(t) })
  39. return mock
  40. }