mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
7f03134d8e
Property Based Tests / api-test (push) Has been cancelled
Continuous Delivery / lint-and-build (push) Has been cancelled
Deploy GitHub Pages / swagger-ui (push) Has been cancelled
CI Pipeline / Lint Proto (push) Has been cancelled
CI Pipeline / Detect Changes (push) Has been cancelled
Continuous Delivery / Build and Push Docker Images (push) Has been cancelled
CI Pipeline / lint-and-build (push) Has been cancelled
CI Pipeline / Test ${{ matrix.module }} (push) Has been cancelled
CI Pipeline / Upload Coverage (push) Has been cancelled
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> Signed-off-by: JeffMboya <jangina.mboya@gmail.com> Co-authored-by: JeffMboya <jangina.mboya@gmail.com>
116 lines
3.3 KiB
Go
116 lines
3.3 KiB
Go
// Copyright (c) Abstract Machines
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"github.com/absmach/magistrala/bootstrap"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewRenderer creates a new instance of Renderer. 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 NewRenderer(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Renderer {
|
|
mock := &Renderer{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Renderer is an autogenerated mock type for the Renderer type
|
|
type Renderer struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Renderer_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Renderer) EXPECT() *Renderer_Expecter {
|
|
return &Renderer_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Render provides a mock function for the type Renderer
|
|
func (_mock *Renderer) Render(profile bootstrap.Profile, enrollment bootstrap.Config, bindings []bootstrap.BindingSnapshot) ([]byte, error) {
|
|
ret := _mock.Called(profile, enrollment, bindings)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Render")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(bootstrap.Profile, bootstrap.Config, []bootstrap.BindingSnapshot) ([]byte, error)); ok {
|
|
return returnFunc(profile, enrollment, bindings)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(bootstrap.Profile, bootstrap.Config, []bootstrap.BindingSnapshot) []byte); ok {
|
|
r0 = returnFunc(profile, enrollment, bindings)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(bootstrap.Profile, bootstrap.Config, []bootstrap.BindingSnapshot) error); ok {
|
|
r1 = returnFunc(profile, enrollment, bindings)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Renderer_Render_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Render'
|
|
type Renderer_Render_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Render is a helper method to define mock.On call
|
|
// - profile bootstrap.Profile
|
|
// - enrollment bootstrap.Config
|
|
// - bindings []bootstrap.BindingSnapshot
|
|
func (_e *Renderer_Expecter) Render(profile interface{}, enrollment interface{}, bindings interface{}) *Renderer_Render_Call {
|
|
return &Renderer_Render_Call{Call: _e.mock.On("Render", profile, enrollment, bindings)}
|
|
}
|
|
|
|
func (_c *Renderer_Render_Call) Run(run func(profile bootstrap.Profile, enrollment bootstrap.Config, bindings []bootstrap.BindingSnapshot)) *Renderer_Render_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 bootstrap.Profile
|
|
if args[0] != nil {
|
|
arg0 = args[0].(bootstrap.Profile)
|
|
}
|
|
var arg1 bootstrap.Config
|
|
if args[1] != nil {
|
|
arg1 = args[1].(bootstrap.Config)
|
|
}
|
|
var arg2 []bootstrap.BindingSnapshot
|
|
if args[2] != nil {
|
|
arg2 = args[2].([]bootstrap.BindingSnapshot)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Renderer_Render_Call) Return(bytes []byte, err error) *Renderer_Render_Call {
|
|
_c.Call.Return(bytes, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Renderer_Render_Call) RunAndReturn(run func(profile bootstrap.Profile, enrollment bootstrap.Config, bindings []bootstrap.BindingSnapshot) ([]byte, error)) *Renderer_Render_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|