github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/oauth20/automock/service.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 internalmodel "github.com/kyma-incubator/compass/components/director/internal/model" 9 mock "github.com/stretchr/testify/mock" 10 11 model "github.com/kyma-incubator/compass/components/director/pkg/model" 12 ) 13 14 // Service is an autogenerated mock type for the Service type 15 type Service struct { 16 mock.Mock 17 } 18 19 // CreateClientCredentials provides a mock function with given fields: ctx, objectType 20 func (_m *Service) CreateClientCredentials(ctx context.Context, objectType model.SystemAuthReferenceObjectType) (*internalmodel.OAuthCredentialDataInput, error) { 21 ret := _m.Called(ctx, objectType) 22 23 var r0 *internalmodel.OAuthCredentialDataInput 24 if rf, ok := ret.Get(0).(func(context.Context, model.SystemAuthReferenceObjectType) *internalmodel.OAuthCredentialDataInput); ok { 25 r0 = rf(ctx, objectType) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(*internalmodel.OAuthCredentialDataInput) 29 } 30 } 31 32 var r1 error 33 if rf, ok := ret.Get(1).(func(context.Context, model.SystemAuthReferenceObjectType) error); ok { 34 r1 = rf(ctx, objectType) 35 } else { 36 r1 = ret.Error(1) 37 } 38 39 return r0, r1 40 } 41 42 // DeleteClientCredentials provides a mock function with given fields: ctx, clientID 43 func (_m *Service) DeleteClientCredentials(ctx context.Context, clientID string) error { 44 ret := _m.Called(ctx, clientID) 45 46 var r0 error 47 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 48 r0 = rf(ctx, clientID) 49 } else { 50 r0 = ret.Error(0) 51 } 52 53 return r0 54 } 55 56 type mockConstructorTestingTNewService interface { 57 mock.TestingT 58 Cleanup(func()) 59 } 60 61 // NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 62 func NewService(t mockConstructorTestingTNewService) *Service { 63 mock := &Service{} 64 mock.Mock.Test(t) 65 66 t.Cleanup(func() { mock.AssertExpectations(t) }) 67 68 return mock 69 }