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>
130 lines
3.3 KiB
Go
130 lines
3.3 KiB
Go
// Copyright (c) Ultraviolet
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
manager "github.com/ultravioletrs/cocos/pkg/manager"
|
|
)
|
|
|
|
// 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}
|
|
}
|
|
|
|
// State provides a mock function with given fields:
|
|
func (_m *StateMachine) State() string {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for State")
|
|
}
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// StateMachine_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State'
|
|
type StateMachine_State_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// State is a helper method to define mock.On call
|
|
func (_e *StateMachine_Expecter) State() *StateMachine_State_Call {
|
|
return &StateMachine_State_Call{Call: _e.mock.On("State")}
|
|
}
|
|
|
|
func (_c *StateMachine_State_Call) Run(run func()) *StateMachine_State_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_State_Call) Return(_a0 string) *StateMachine_State_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_State_Call) RunAndReturn(run func() string) *StateMachine_State_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Transition provides a mock function with given fields: newState
|
|
func (_m *StateMachine) Transition(newState manager.ManagerState) error {
|
|
ret := _m.Called(newState)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Transition")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(manager.ManagerState) error); ok {
|
|
r0 = rf(newState)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// StateMachine_Transition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transition'
|
|
type StateMachine_Transition_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Transition is a helper method to define mock.On call
|
|
// - newState manager.ManagerState
|
|
func (_e *StateMachine_Expecter) Transition(newState interface{}) *StateMachine_Transition_Call {
|
|
return &StateMachine_Transition_Call{Call: _e.mock.On("Transition", newState)}
|
|
}
|
|
|
|
func (_c *StateMachine_Transition_Call) Run(run func(newState manager.ManagerState)) *StateMachine_Transition_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(manager.ManagerState))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_Transition_Call) Return(_a0 error) *StateMachine_Transition_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *StateMachine_Transition_Call) RunAndReturn(run func(manager.ManagerState) error) *StateMachine_Transition_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
|
|
}
|