flamingo.me/flamingo-commerce/v3@v3.11.0/product/domain/mocks/product_service.go (about)

     1  // Code generated by mockery v2.42.3. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	domain "flamingo.me/flamingo-commerce/v3/product/domain"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // ProductService is an autogenerated mock type for the ProductService type
    13  type ProductService struct {
    14  	mock.Mock
    15  }
    16  
    17  type ProductService_Expecter struct {
    18  	mock *mock.Mock
    19  }
    20  
    21  func (_m *ProductService) EXPECT() *ProductService_Expecter {
    22  	return &ProductService_Expecter{mock: &_m.Mock}
    23  }
    24  
    25  // Get provides a mock function with given fields: ctx, marketplaceCode
    26  func (_m *ProductService) Get(ctx context.Context, marketplaceCode string) (domain.BasicProduct, error) {
    27  	ret := _m.Called(ctx, marketplaceCode)
    28  
    29  	if len(ret) == 0 {
    30  		panic("no return value specified for Get")
    31  	}
    32  
    33  	var r0 domain.BasicProduct
    34  	var r1 error
    35  	if rf, ok := ret.Get(0).(func(context.Context, string) (domain.BasicProduct, error)); ok {
    36  		return rf(ctx, marketplaceCode)
    37  	}
    38  	if rf, ok := ret.Get(0).(func(context.Context, string) domain.BasicProduct); ok {
    39  		r0 = rf(ctx, marketplaceCode)
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(domain.BasicProduct)
    43  		}
    44  	}
    45  
    46  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    47  		r1 = rf(ctx, marketplaceCode)
    48  	} else {
    49  		r1 = ret.Error(1)
    50  	}
    51  
    52  	return r0, r1
    53  }
    54  
    55  // ProductService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
    56  type ProductService_Get_Call struct {
    57  	*mock.Call
    58  }
    59  
    60  // Get is a helper method to define mock.On call
    61  //   - ctx context.Context
    62  //   - marketplaceCode string
    63  func (_e *ProductService_Expecter) Get(ctx interface{}, marketplaceCode interface{}) *ProductService_Get_Call {
    64  	return &ProductService_Get_Call{Call: _e.mock.On("Get", ctx, marketplaceCode)}
    65  }
    66  
    67  func (_c *ProductService_Get_Call) Run(run func(ctx context.Context, marketplaceCode string)) *ProductService_Get_Call {
    68  	_c.Call.Run(func(args mock.Arguments) {
    69  		run(args[0].(context.Context), args[1].(string))
    70  	})
    71  	return _c
    72  }
    73  
    74  func (_c *ProductService_Get_Call) Return(_a0 domain.BasicProduct, _a1 error) *ProductService_Get_Call {
    75  	_c.Call.Return(_a0, _a1)
    76  	return _c
    77  }
    78  
    79  func (_c *ProductService_Get_Call) RunAndReturn(run func(context.Context, string) (domain.BasicProduct, error)) *ProductService_Get_Call {
    80  	_c.Call.Return(run)
    81  	return _c
    82  }
    83  
    84  // NewProductService creates a new instance of ProductService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    85  // The first argument is typically a *testing.T value.
    86  func NewProductService(t interface {
    87  	mock.TestingT
    88  	Cleanup(func())
    89  }) *ProductService {
    90  	mock := &ProductService{}
    91  	mock.Mock.Test(t)
    92  
    93  	t.Cleanup(func() { mock.AssertExpectations(t) })
    94  
    95  	return mock
    96  }