net.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Code generated by mockery v2.14.0. DO NOT EDIT.
  2. package mocks
  3. import (
  4. net "net"
  5. mock "github.com/stretchr/testify/mock"
  6. )
  7. // Net is an autogenerated mock type for the Net type
  8. type Net struct {
  9. mock.Mock
  10. }
  11. // InterfaceByName provides a mock function with given fields: name
  12. func (_m *Net) InterfaceByName(name string) (*net.Interface, error) {
  13. ret := _m.Called(name)
  14. var r0 *net.Interface
  15. if rf, ok := ret.Get(0).(func(string) *net.Interface); ok {
  16. r0 = rf(name)
  17. } else {
  18. if ret.Get(0) != nil {
  19. r0 = ret.Get(0).(*net.Interface)
  20. }
  21. }
  22. var r1 error
  23. if rf, ok := ret.Get(1).(func(string) error); ok {
  24. r1 = rf(name)
  25. } else {
  26. r1 = ret.Error(1)
  27. }
  28. return r0, r1
  29. }
  30. // Interfaces provides a mock function with given fields:
  31. func (_m *Net) Interfaces() ([]net.Interface, error) {
  32. ret := _m.Called()
  33. var r0 []net.Interface
  34. if rf, ok := ret.Get(0).(func() []net.Interface); ok {
  35. r0 = rf()
  36. } else {
  37. if ret.Get(0) != nil {
  38. r0 = ret.Get(0).([]net.Interface)
  39. }
  40. }
  41. var r1 error
  42. if rf, ok := ret.Get(1).(func() error); ok {
  43. r1 = rf()
  44. } else {
  45. r1 = ret.Error(1)
  46. }
  47. return r0, r1
  48. }
  49. type mockConstructorTestingTNewNet interface {
  50. mock.TestingT
  51. Cleanup(func())
  52. }
  53. // NewNet creates a new instance of Net. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  54. func NewNet(t mockConstructorTestingTNewNet) *Net {
  55. mock := &Net{}
  56. mock.Mock.Test(t)
  57. t.Cleanup(func() { mock.AssertExpectations(t) })
  58. return mock
  59. }