github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/scopes_sync/automock/o_auth_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/pkg/model" 9 mock "github.com/stretchr/testify/mock" 10 11 models "github.com/ory/hydra-client-go/models" 12 13 oauth20 "github.com/kyma-incubator/compass/components/director/internal/domain/oauth20" 14 ) 15 16 // OAuthService is an autogenerated mock type for the OAuthService type 17 type OAuthService struct { 18 mock.Mock 19 } 20 21 // GetClientDetails provides a mock function with given fields: objType 22 func (_m *OAuthService) GetClientDetails(objType model.SystemAuthReferenceObjectType) (*oauth20.ClientDetails, error) { 23 ret := _m.Called(objType) 24 25 var r0 *oauth20.ClientDetails 26 if rf, ok := ret.Get(0).(func(model.SystemAuthReferenceObjectType) *oauth20.ClientDetails); ok { 27 r0 = rf(objType) 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(*oauth20.ClientDetails) 31 } 32 } 33 34 var r1 error 35 if rf, ok := ret.Get(1).(func(model.SystemAuthReferenceObjectType) error); ok { 36 r1 = rf(objType) 37 } else { 38 r1 = ret.Error(1) 39 } 40 41 return r0, r1 42 } 43 44 // ListClients provides a mock function with given fields: 45 func (_m *OAuthService) ListClients() ([]*models.OAuth2Client, error) { 46 ret := _m.Called() 47 48 var r0 []*models.OAuth2Client 49 if rf, ok := ret.Get(0).(func() []*models.OAuth2Client); ok { 50 r0 = rf() 51 } else { 52 if ret.Get(0) != nil { 53 r0 = ret.Get(0).([]*models.OAuth2Client) 54 } 55 } 56 57 var r1 error 58 if rf, ok := ret.Get(1).(func() error); ok { 59 r1 = rf() 60 } else { 61 r1 = ret.Error(1) 62 } 63 64 return r0, r1 65 } 66 67 // UpdateClient provides a mock function with given fields: ctx, clientID, objectType 68 func (_m *OAuthService) UpdateClient(ctx context.Context, clientID string, objectType model.SystemAuthReferenceObjectType) error { 69 ret := _m.Called(ctx, clientID, objectType) 70 71 var r0 error 72 if rf, ok := ret.Get(0).(func(context.Context, string, model.SystemAuthReferenceObjectType) error); ok { 73 r0 = rf(ctx, clientID, objectType) 74 } else { 75 r0 = ret.Error(0) 76 } 77 78 return r0 79 } 80 81 type mockConstructorTestingTNewOAuthService interface { 82 mock.TestingT 83 Cleanup(func()) 84 } 85 86 // NewOAuthService creates a new instance of OAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 87 func NewOAuthService(t mockConstructorTestingTNewOAuthService) *OAuthService { 88 mock := &OAuthService{} 89 mock.Mock.Test(t) 90 91 t.Cleanup(func() { mock.AssertExpectations(t) }) 92 93 return mock 94 }