github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/applicationtenancy/automock/business_tenant_mapping_service.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	model "github.com/kyma-incubator/compass/components/director/internal/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	tenant "github.com/kyma-incubator/compass/components/director/pkg/tenant"
    12  )
    13  
    14  // BusinessTenantMappingService is an autogenerated mock type for the BusinessTenantMappingService type
    15  type BusinessTenantMappingService struct {
    16  	mock.Mock
    17  }
    18  
    19  // CreateTenantAccessForResource provides a mock function with given fields: ctx, tenantAccess
    20  func (_m *BusinessTenantMappingService) CreateTenantAccessForResource(ctx context.Context, tenantAccess *model.TenantAccess) error {
    21  	ret := _m.Called(ctx, tenantAccess)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(context.Context, *model.TenantAccess) error); ok {
    25  		r0 = rf(ctx, tenantAccess)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // GetCustomerIDParentRecursively provides a mock function with given fields: ctx, tenantID
    34  func (_m *BusinessTenantMappingService) GetCustomerIDParentRecursively(ctx context.Context, tenantID string) (string, error) {
    35  	ret := _m.Called(ctx, tenantID)
    36  
    37  	var r0 string
    38  	if rf, ok := ret.Get(0).(func(context.Context, string) string); ok {
    39  		r0 = rf(ctx, tenantID)
    40  	} else {
    41  		r0 = ret.Get(0).(string)
    42  	}
    43  
    44  	var r1 error
    45  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    46  		r1 = rf(ctx, tenantID)
    47  	} else {
    48  		r1 = ret.Error(1)
    49  	}
    50  
    51  	return r0, r1
    52  }
    53  
    54  // GetTenantByExternalID provides a mock function with given fields: ctx, id
    55  func (_m *BusinessTenantMappingService) GetTenantByExternalID(ctx context.Context, id string) (*model.BusinessTenantMapping, error) {
    56  	ret := _m.Called(ctx, id)
    57  
    58  	var r0 *model.BusinessTenantMapping
    59  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.BusinessTenantMapping); ok {
    60  		r0 = rf(ctx, id)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).(*model.BusinessTenantMapping)
    64  		}
    65  	}
    66  
    67  	var r1 error
    68  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    69  		r1 = rf(ctx, id)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // GetTenantByID provides a mock function with given fields: ctx, id
    78  func (_m *BusinessTenantMappingService) GetTenantByID(ctx context.Context, id string) (*model.BusinessTenantMapping, error) {
    79  	ret := _m.Called(ctx, id)
    80  
    81  	var r0 *model.BusinessTenantMapping
    82  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.BusinessTenantMapping); ok {
    83  		r0 = rf(ctx, id)
    84  	} else {
    85  		if ret.Get(0) != nil {
    86  			r0 = ret.Get(0).(*model.BusinessTenantMapping)
    87  		}
    88  	}
    89  
    90  	var r1 error
    91  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    92  		r1 = rf(ctx, id)
    93  	} else {
    94  		r1 = ret.Error(1)
    95  	}
    96  
    97  	return r0, r1
    98  }
    99  
   100  // ListByParentAndType provides a mock function with given fields: ctx, parentID, tenantType
   101  func (_m *BusinessTenantMappingService) ListByParentAndType(ctx context.Context, parentID string, tenantType tenant.Type) ([]*model.BusinessTenantMapping, error) {
   102  	ret := _m.Called(ctx, parentID, tenantType)
   103  
   104  	var r0 []*model.BusinessTenantMapping
   105  	if rf, ok := ret.Get(0).(func(context.Context, string, tenant.Type) []*model.BusinessTenantMapping); ok {
   106  		r0 = rf(ctx, parentID, tenantType)
   107  	} else {
   108  		if ret.Get(0) != nil {
   109  			r0 = ret.Get(0).([]*model.BusinessTenantMapping)
   110  		}
   111  	}
   112  
   113  	var r1 error
   114  	if rf, ok := ret.Get(1).(func(context.Context, string, tenant.Type) error); ok {
   115  		r1 = rf(ctx, parentID, tenantType)
   116  	} else {
   117  		r1 = ret.Error(1)
   118  	}
   119  
   120  	return r0, r1
   121  }
   122  
   123  type mockConstructorTestingTNewBusinessTenantMappingService interface {
   124  	mock.TestingT
   125  	Cleanup(func())
   126  }
   127  
   128  // NewBusinessTenantMappingService creates a new instance of BusinessTenantMappingService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   129  func NewBusinessTenantMappingService(t mockConstructorTestingTNewBusinessTenantMappingService) *BusinessTenantMappingService {
   130  	mock := &BusinessTenantMappingService{}
   131  	mock.Mock.Test(t)
   132  
   133  	t.Cleanup(func() { mock.AssertExpectations(t) })
   134  
   135  	return mock
   136  }