64a251d69a
* improve the syncMap.Iterate test to make it 100% reproducible * rename store/mocks/Store.go * rename mocks/store to mock/store
104 lines
2.0 KiB
Go
104 lines
2.0 KiB
Go
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
|
|
|
package mock
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
import store "github.com/micro/go-micro/store"
|
|
|
|
// Store is an autogenerated mock type for the Store type
|
|
type Store struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Delete provides a mock function with given fields: key
|
|
func (_m *Store) Delete(key ...string) error {
|
|
_va := make([]interface{}, len(key))
|
|
for _i := range key {
|
|
_va[_i] = key[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(...string) error); ok {
|
|
r0 = rf(key...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// List provides a mock function with given fields:
|
|
func (_m *Store) List() ([]*store.Record, error) {
|
|
ret := _m.Called()
|
|
|
|
var r0 []*store.Record
|
|
if rf, ok := ret.Get(0).(func() []*store.Record); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*store.Record)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Read provides a mock function with given fields: key
|
|
func (_m *Store) Read(key ...string) ([]*store.Record, error) {
|
|
_va := make([]interface{}, len(key))
|
|
for _i := range key {
|
|
_va[_i] = key[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 []*store.Record
|
|
if rf, ok := ret.Get(0).(func(...string) []*store.Record); ok {
|
|
r0 = rf(key...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*store.Record)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(...string) error); ok {
|
|
r1 = rf(key...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Write provides a mock function with given fields: rec
|
|
func (_m *Store) Write(rec ...*store.Record) error {
|
|
_va := make([]interface{}, len(rec))
|
|
for _i := range rec {
|
|
_va[_i] = rec[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(...*store.Record) error); ok {
|
|
r0 = rf(rec...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|