github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formation/automock/tenant_service.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	model "github.com/kyma-incubator/compass/components/director/internal/model"
    11  )
    12  
    13  // TenantService is an autogenerated mock type for the tenantService type
    14  type TenantService struct {
    15  	mock.Mock
    16  }
    17  
    18  // GetInternalTenant provides a mock function with given fields: ctx, externalTenant
    19  func (_m *TenantService) GetInternalTenant(ctx context.Context, externalTenant string) (string, error) {
    20  	ret := _m.Called(ctx, externalTenant)
    21  
    22  	var r0 string
    23  	if rf, ok := ret.Get(0).(func(context.Context, string) string); ok {
    24  		r0 = rf(ctx, externalTenant)
    25  	} else {
    26  		r0 = ret.Get(0).(string)
    27  	}
    28  
    29  	var r1 error
    30  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    31  		r1 = rf(ctx, externalTenant)
    32  	} else {
    33  		r1 = ret.Error(1)
    34  	}
    35  
    36  	return r0, r1
    37  }
    38  
    39  // GetTenantByExternalID provides a mock function with given fields: ctx, id
    40  func (_m *TenantService) GetTenantByExternalID(ctx context.Context, id string) (*model.BusinessTenantMapping, error) {
    41  	ret := _m.Called(ctx, id)
    42  
    43  	var r0 *model.BusinessTenantMapping
    44  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.BusinessTenantMapping); ok {
    45  		r0 = rf(ctx, id)
    46  	} else {
    47  		if ret.Get(0) != nil {
    48  			r0 = ret.Get(0).(*model.BusinessTenantMapping)
    49  		}
    50  	}
    51  
    52  	var r1 error
    53  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    54  		r1 = rf(ctx, id)
    55  	} else {
    56  		r1 = ret.Error(1)
    57  	}
    58  
    59  	return r0, r1
    60  }
    61  
    62  // GetTenantByID provides a mock function with given fields: ctx, id
    63  func (_m *TenantService) GetTenantByID(ctx context.Context, id string) (*model.BusinessTenantMapping, error) {
    64  	ret := _m.Called(ctx, id)
    65  
    66  	var r0 *model.BusinessTenantMapping
    67  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.BusinessTenantMapping); ok {
    68  		r0 = rf(ctx, id)
    69  	} else {
    70  		if ret.Get(0) != nil {
    71  			r0 = ret.Get(0).(*model.BusinessTenantMapping)
    72  		}
    73  	}
    74  
    75  	var r1 error
    76  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    77  		r1 = rf(ctx, id)
    78  	} else {
    79  		r1 = ret.Error(1)
    80  	}
    81  
    82  	return r0, r1
    83  }
    84  
    85  type mockConstructorTestingTNewTenantService interface {
    86  	mock.TestingT
    87  	Cleanup(func())
    88  }
    89  
    90  // NewTenantService creates a new instance of TenantService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    91  func NewTenantService(t mockConstructorTestingTNewTenantService) *TenantService {
    92  	mock := &TenantService{}
    93  	mock.Mock.Test(t)
    94  
    95  	t.Cleanup(func() { mock.AssertExpectations(t) })
    96  
    97  	return mock
    98  }