mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
bceb1727d1
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
234 lines
6.6 KiB
Go
234 lines
6.6 KiB
Go
// Copyright (c) Ultraviolet
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
statemachine "github.com/ultravioletrs/cocos/agent/statemachine"
|
|
)
|
|
|
|
// StateMachine is an autogenerated mock type for the StateMachine type
|
|
type StateMachine struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type StateMachine_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *StateMachine) EXPECT() *StateMachine_Expecter {
|
|
return &StateMachine_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddTransition provides a mock function with given fields: t
|
|
func (_m *StateMachine) AddTransition(t statemachine.Transition) {
|
|
_m.Called(t)
|
|
}
|
|
|
|
// StateMachine_AddTransition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddTransition'
|
|
type StateMachine_AddTransition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddTransition is a helper method to define mock.On call
|
|
// - t statemachine.Transition
|
|
func (_e *StateMachine_Expecter) AddTransition(t interface{}) *StateMachine_AddTransition_Call {
|
|
return &StateMachine_AddTransition_Call{Call: _e.mock.On("AddTransition", t)}
|
|
}
|
|
|
|
func (_c *StateMachine_AddTransition_Call) Run(run func(t statemachine.Transition)) *StateMachine_AddTransition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(statemachine.Transition))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_AddTransition_Call) Return() *StateMachine_AddTransition_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_AddTransition_Call) RunAndReturn(run func(statemachine.Transition)) *StateMachine_AddTransition_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetState provides a mock function with given fields:
|
|
func (_m *StateMachine) GetState() statemachine.State {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetState")
|
|
}
|
|
|
|
var r0 statemachine.State
|
|
if rf, ok := ret.Get(0).(func() statemachine.State); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(statemachine.State)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// StateMachine_GetState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetState'
|
|
type StateMachine_GetState_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetState is a helper method to define mock.On call
|
|
func (_e *StateMachine_Expecter) GetState() *StateMachine_GetState_Call {
|
|
return &StateMachine_GetState_Call{Call: _e.mock.On("GetState")}
|
|
}
|
|
|
|
func (_c *StateMachine_GetState_Call) Run(run func()) *StateMachine_GetState_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_GetState_Call) Return(_a0 statemachine.State) *StateMachine_GetState_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_GetState_Call) RunAndReturn(run func() statemachine.State) *StateMachine_GetState_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SendEvent provides a mock function with given fields: event
|
|
func (_m *StateMachine) SendEvent(event statemachine.Event) {
|
|
_m.Called(event)
|
|
}
|
|
|
|
// StateMachine_SendEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendEvent'
|
|
type StateMachine_SendEvent_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SendEvent is a helper method to define mock.On call
|
|
// - event statemachine.Event
|
|
func (_e *StateMachine_Expecter) SendEvent(event interface{}) *StateMachine_SendEvent_Call {
|
|
return &StateMachine_SendEvent_Call{Call: _e.mock.On("SendEvent", event)}
|
|
}
|
|
|
|
func (_c *StateMachine_SendEvent_Call) Run(run func(event statemachine.Event)) *StateMachine_SendEvent_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(statemachine.Event))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_SendEvent_Call) Return() *StateMachine_SendEvent_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_SendEvent_Call) RunAndReturn(run func(statemachine.Event)) *StateMachine_SendEvent_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetAction provides a mock function with given fields: state, action
|
|
func (_m *StateMachine) SetAction(state statemachine.State, action statemachine.Action) {
|
|
_m.Called(state, action)
|
|
}
|
|
|
|
// StateMachine_SetAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAction'
|
|
type StateMachine_SetAction_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetAction is a helper method to define mock.On call
|
|
// - state statemachine.State
|
|
// - action statemachine.Action
|
|
func (_e *StateMachine_Expecter) SetAction(state interface{}, action interface{}) *StateMachine_SetAction_Call {
|
|
return &StateMachine_SetAction_Call{Call: _e.mock.On("SetAction", state, action)}
|
|
}
|
|
|
|
func (_c *StateMachine_SetAction_Call) Run(run func(state statemachine.State, action statemachine.Action)) *StateMachine_SetAction_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(statemachine.State), args[1].(statemachine.Action))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_SetAction_Call) Return() *StateMachine_SetAction_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_SetAction_Call) RunAndReturn(run func(statemachine.State, statemachine.Action)) *StateMachine_SetAction_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Start provides a mock function with given fields: ctx
|
|
func (_m *StateMachine) Start(ctx context.Context) error {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Start")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// StateMachine_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
|
|
type StateMachine_Start_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Start is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *StateMachine_Expecter) Start(ctx interface{}) *StateMachine_Start_Call {
|
|
return &StateMachine_Start_Call{Call: _e.mock.On("Start", ctx)}
|
|
}
|
|
|
|
func (_c *StateMachine_Start_Call) Run(run func(ctx context.Context)) *StateMachine_Start_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_Start_Call) Return(_a0 error) *StateMachine_Start_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_Start_Call) RunAndReturn(run func(context.Context) error) *StateMachine_Start_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewStateMachine creates a new instance of StateMachine. 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 NewStateMachine(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *StateMachine {
|
|
mock := &StateMachine{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|