mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 02:49:32 +01:00
96 lines
2.4 KiB
Go
96 lines
2.4 KiB
Go
// Code generated by mockery v2.44.1. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
// GeoLocator is an autogenerated mock type for the GeoLocator type
|
|
type GeoLocator struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type GeoLocator_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *GeoLocator) EXPECT() *GeoLocator_Expecter {
|
|
return &GeoLocator_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Lookup provides a mock function with given fields: ipString
|
|
func (_m *GeoLocator) Lookup(ipString string) (float64, float64, error) {
|
|
ret := _m.Called(ipString)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Lookup")
|
|
}
|
|
|
|
var r0 float64
|
|
var r1 float64
|
|
var r2 error
|
|
if rf, ok := ret.Get(0).(func(string) (float64, float64, error)); ok {
|
|
return rf(ipString)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) float64); ok {
|
|
r0 = rf(ipString)
|
|
} else {
|
|
r0 = ret.Get(0).(float64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) float64); ok {
|
|
r1 = rf(ipString)
|
|
} else {
|
|
r1 = ret.Get(1).(float64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(string) error); ok {
|
|
r2 = rf(ipString)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// GeoLocator_Lookup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lookup'
|
|
type GeoLocator_Lookup_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Lookup is a helper method to define mock.On call
|
|
// - ipString string
|
|
func (_e *GeoLocator_Expecter) Lookup(ipString interface{}) *GeoLocator_Lookup_Call {
|
|
return &GeoLocator_Lookup_Call{Call: _e.mock.On("Lookup", ipString)}
|
|
}
|
|
|
|
func (_c *GeoLocator_Lookup_Call) Run(run func(ipString string)) *GeoLocator_Lookup_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *GeoLocator_Lookup_Call) Return(_a0 float64, _a1 float64, _a2 error) *GeoLocator_Lookup_Call {
|
|
_c.Call.Return(_a0, _a1, _a2)
|
|
return _c
|
|
}
|
|
|
|
func (_c *GeoLocator_Lookup_Call) RunAndReturn(run func(string) (float64, float64, error)) *GeoLocator_Lookup_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewGeoLocator creates a new instance of GeoLocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewGeoLocator(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *GeoLocator {
|
|
mock := &GeoLocator{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|