Moving add client in keycloak from security to invoker api
[nonrtric/plt/sme.git] / capifcore / internal / keycloak / mocks / AccessManagement.go
1 // Code generated by mockery v2.20.0. DO NOT EDIT.
2
3 package mocks
4
5 import (
6         mock "github.com/stretchr/testify/mock"
7         keycloak "oransc.org/nonrtric/capifcore/internal/keycloak"
8 )
9
10 // AccessManagement is an autogenerated mock type for the AccessManagement type
11 type AccessManagement struct {
12         mock.Mock
13 }
14
15 // AddClient provides a mock function with given fields: clientId, realm
16 func (_m *AccessManagement) AddClient(clientId string, realm string) error {
17         ret := _m.Called(clientId, realm)
18
19         var r0 error
20         if rf, ok := ret.Get(0).(func(string, string) error); ok {
21                 r0 = rf(clientId, realm)
22         } else {
23                 r0 = ret.Error(0)
24         }
25
26         return r0
27 }
28
29 // GetClientRepresentation provides a mock function with given fields: clientId, realm
30 func (_m *AccessManagement) GetClientRepresentation(clientId string, realm string) (*keycloak.Client, error) {
31         ret := _m.Called(clientId, realm)
32
33         var r0 *keycloak.Client
34         var r1 error
35         if rf, ok := ret.Get(0).(func(string, string) (*keycloak.Client, error)); ok {
36                 return rf(clientId, realm)
37         }
38         if rf, ok := ret.Get(0).(func(string, string) *keycloak.Client); ok {
39                 r0 = rf(clientId, realm)
40         } else {
41                 if ret.Get(0) != nil {
42                         r0 = ret.Get(0).(*keycloak.Client)
43                 }
44         }
45
46         if rf, ok := ret.Get(1).(func(string, string) error); ok {
47                 r1 = rf(clientId, realm)
48         } else {
49                 r1 = ret.Error(1)
50         }
51
52         return r0, r1
53 }
54
55 // GetToken provides a mock function with given fields: realm, data
56 func (_m *AccessManagement) GetToken(realm string, data map[string][]string) (keycloak.Jwttoken, error) {
57         ret := _m.Called(realm, data)
58
59         var r0 keycloak.Jwttoken
60         var r1 error
61         if rf, ok := ret.Get(0).(func(string, map[string][]string) (keycloak.Jwttoken, error)); ok {
62                 return rf(realm, data)
63         }
64         if rf, ok := ret.Get(0).(func(string, map[string][]string) keycloak.Jwttoken); ok {
65                 r0 = rf(realm, data)
66         } else {
67                 r0 = ret.Get(0).(keycloak.Jwttoken)
68         }
69
70         if rf, ok := ret.Get(1).(func(string, map[string][]string) error); ok {
71                 r1 = rf(realm, data)
72         } else {
73                 r1 = ret.Error(1)
74         }
75
76         return r0, r1
77 }
78
79 type mockConstructorTestingTNewAccessManagement interface {
80         mock.TestingT
81         Cleanup(func())
82 }
83
84 // NewAccessManagement creates a new instance of AccessManagement. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
85 func NewAccessManagement(t mockConstructorTestingTNewAccessManagement) *AccessManagement {
86         mock := &AccessManagement{}
87         mock.Mock.Test(t)
88
89         t.Cleanup(func() { mock.AssertExpectations(t) })
90
91         return mock
92 }