github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/tenantfetchersvc/resync/automock/tenant_creator.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 12 // TenantCreator is an autogenerated mock type for the TenantCreator type 13 type TenantCreator struct { 14 mock.Mock 15 } 16 17 // CreateTenants provides a mock function with given fields: ctx, eventsTenants 18 func (_m *TenantCreator) CreateTenants(ctx context.Context, eventsTenants []model.BusinessTenantMappingInput) error { 19 ret := _m.Called(ctx, eventsTenants) 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func(context.Context, []model.BusinessTenantMappingInput) error); ok { 23 r0 = rf(ctx, eventsTenants) 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // FetchTenant provides a mock function with given fields: ctx, externalTenantID 32 func (_m *TenantCreator) FetchTenant(ctx context.Context, externalTenantID string) (*model.BusinessTenantMappingInput, error) { 33 ret := _m.Called(ctx, externalTenantID) 34 35 var r0 *model.BusinessTenantMappingInput 36 if rf, ok := ret.Get(0).(func(context.Context, string) *model.BusinessTenantMappingInput); ok { 37 r0 = rf(ctx, externalTenantID) 38 } else { 39 if ret.Get(0) != nil { 40 r0 = ret.Get(0).(*model.BusinessTenantMappingInput) 41 } 42 } 43 44 var r1 error 45 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 46 r1 = rf(ctx, externalTenantID) 47 } else { 48 r1 = ret.Error(1) 49 } 50 51 return r0, r1 52 } 53 54 // TenantsToCreate provides a mock function with given fields: ctx, region, fromTimestamp 55 func (_m *TenantCreator) TenantsToCreate(ctx context.Context, region string, fromTimestamp string) ([]model.BusinessTenantMappingInput, error) { 56 ret := _m.Called(ctx, region, fromTimestamp) 57 58 var r0 []model.BusinessTenantMappingInput 59 if rf, ok := ret.Get(0).(func(context.Context, string, string) []model.BusinessTenantMappingInput); ok { 60 r0 = rf(ctx, region, fromTimestamp) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).([]model.BusinessTenantMappingInput) 64 } 65 } 66 67 var r1 error 68 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 69 r1 = rf(ctx, region, fromTimestamp) 70 } else { 71 r1 = ret.Error(1) 72 } 73 74 return r0, r1 75 } 76 77 type mockConstructorTestingTNewTenantCreator interface { 78 mock.TestingT 79 Cleanup(func()) 80 } 81 82 // NewTenantCreator creates a new instance of TenantCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 83 func NewTenantCreator(t mockConstructorTestingTNewTenantCreator) *TenantCreator { 84 mock := &TenantCreator{} 85 mock.Mock.Test(t) 86 87 t.Cleanup(func() { mock.AssertExpectations(t) }) 88 89 return mock 90 }