mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:30:25 +00:00
eb881690c7
Signed-off-by: 1998-felix <felix.gateru@gmail.com> Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> Signed-off-by: Felix Gateru <felix.gateru@gmail.com> Signed-off-by: Arvindh <arvindh91@gmail.com> Co-authored-by: Felix Gateru <felix.gateru@gmail.com> Co-authored-by: Arvindh <arvindh91@gmail.com> Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
// Copyright (c) Abstract Machines
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
policies "github.com/absmach/magistrala/pkg/policies"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Authz is an autogenerated mock type for the Authz type
|
|
type Authz struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Authorize provides a mock function with given fields: ctx, pr
|
|
func (_m *Authz) Authorize(ctx context.Context, pr policies.Policy) error {
|
|
ret := _m.Called(ctx, pr)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Authorize")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, policies.Policy) error); ok {
|
|
r0 = rf(ctx, pr)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewAuthz creates a new instance of Authz. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewAuthz(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Authz {
|
|
mock := &Authz{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|