forked from ebhomengo/niki
1
0
Fork 0
niki/validator/benefactor/address/mock_BenefactorSvc_test.go

95 lines
3.4 KiB
Go
Raw Normal View History

// Code generated by mockery v2.41.0. DO NOT EDIT.
package benefactoraddressvalidator
import (
context "context"
benefactoreparam "git.gocasts.ir/ebhomengo/niki/param/benefactor/benefactor"
mock "github.com/stretchr/testify/mock"
)
// MockBenefactorSvc is an autogenerated mock type for the BenefactorSvc type
type MockBenefactorSvc struct {
mock.Mock
}
type MockBenefactorSvc_Expecter struct {
mock *mock.Mock
}
func (_m *MockBenefactorSvc) EXPECT() *MockBenefactorSvc_Expecter {
return &MockBenefactorSvc_Expecter{mock: &_m.Mock}
}
// BenefactorExistByID provides a mock function with given fields: ctx, request
func (_m *MockBenefactorSvc) BenefactorExistByID(ctx context.Context, request benefactoreparam.BenefactorExistByIDRequest) (benefactoreparam.BenefactorExistByIDResponse, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for BenefactorExistByID")
}
var r0 benefactoreparam.BenefactorExistByIDResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, benefactoreparam.BenefactorExistByIDRequest) (benefactoreparam.BenefactorExistByIDResponse, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, benefactoreparam.BenefactorExistByIDRequest) benefactoreparam.BenefactorExistByIDResponse); ok {
r0 = rf(ctx, request)
} else {
r0 = ret.Get(0).(benefactoreparam.BenefactorExistByIDResponse)
}
if rf, ok := ret.Get(1).(func(context.Context, benefactoreparam.BenefactorExistByIDRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockBenefactorSvc_BenefactorExistByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BenefactorExistByID'
type MockBenefactorSvc_BenefactorExistByID_Call struct {
*mock.Call
}
// BenefactorExistByID is a helper method to define mock.On call
// - ctx context.Context
// - request benefactoreparam.BenefactorExistByIDRequest
func (_e *MockBenefactorSvc_Expecter) BenefactorExistByID(ctx interface{}, request interface{}) *MockBenefactorSvc_BenefactorExistByID_Call {
return &MockBenefactorSvc_BenefactorExistByID_Call{Call: _e.mock.On("BenefactorExistByID", ctx, request)}
}
func (_c *MockBenefactorSvc_BenefactorExistByID_Call) Run(run func(ctx context.Context, request benefactoreparam.BenefactorExistByIDRequest)) *MockBenefactorSvc_BenefactorExistByID_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(benefactoreparam.BenefactorExistByIDRequest))
})
return _c
}
func (_c *MockBenefactorSvc_BenefactorExistByID_Call) Return(_a0 benefactoreparam.BenefactorExistByIDResponse, _a1 error) *MockBenefactorSvc_BenefactorExistByID_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockBenefactorSvc_BenefactorExistByID_Call) RunAndReturn(run func(context.Context, benefactoreparam.BenefactorExistByIDRequest) (benefactoreparam.BenefactorExistByIDResponse, error)) *MockBenefactorSvc_BenefactorExistByID_Call {
_c.Call.Return(run)
return _c
}
// NewMockBenefactorSvc creates a new instance of MockBenefactorSvc. 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 NewMockBenefactorSvc(t interface {
mock.TestingT
Cleanup(func())
}) *MockBenefactorSvc {
mock := &MockBenefactorSvc{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}