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