Generating token using keycloak
[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 // GetToken provides a mock function with given fields: clientId, clientPassword, scope, realm
16 func (_m *AccessManagement) GetToken(clientId string, clientPassword string, scope string, realm string) (keycloak.Jwttoken, error) {
17         ret := _m.Called(clientId, clientPassword, scope, realm)
18
19         var r0 keycloak.Jwttoken
20         var r1 error
21         if rf, ok := ret.Get(0).(func(string, string, string, string) (keycloak.Jwttoken, error)); ok {
22                 return rf(clientId, clientPassword, scope, realm)
23         }
24         if rf, ok := ret.Get(0).(func(string, string, string, string) keycloak.Jwttoken); ok {
25                 r0 = rf(clientId, clientPassword, scope, realm)
26         } else {
27                 r0 = ret.Get(0).(keycloak.Jwttoken)
28         }
29
30         if rf, ok := ret.Get(1).(func(string, string, string, string) error); ok {
31                 r1 = rf(clientId, clientPassword, scope, realm)
32         } else {
33                 r1 = ret.Error(1)
34         }
35
36         return r0, r1
37 }
38
39 type mockConstructorTestingTNewAccessManagement interface {
40         mock.TestingT
41         Cleanup(func())
42 }
43
44 // 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.
45 func NewAccessManagement(t mockConstructorTestingTNewAccessManagement) *AccessManagement {
46         mock := &AccessManagement{}
47         mock.Mock.Test(t)
48
49         t.Cleanup(func() { mock.AssertExpectations(t) })
50
51         return mock
52 }