mocks

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) AddRoute

func (_m *Client) AddRoute(topic string, callback mqtt.MessageHandler)

AddRoute provides a mock function with given fields: topic, callback

func (*Client) Connect

func (_m *Client) Connect() mqtt.Token

Connect provides a mock function with given fields:

func (*Client) Disconnect

func (_m *Client) Disconnect(quiesce uint)

Disconnect provides a mock function with given fields: quiesce

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) IsConnected

func (_m *Client) IsConnected() bool

IsConnected provides a mock function with given fields:

func (*Client) IsConnectionOpen

func (_m *Client) IsConnectionOpen() bool

IsConnectionOpen provides a mock function with given fields:

func (*Client) OptionsReader

func (_m *Client) OptionsReader() mqtt.ClientOptionsReader

OptionsReader provides a mock function with given fields:

func (*Client) Publish

func (_m *Client) Publish(topic string, qos byte, retained bool, payload interface{}) mqtt.Token

Publish provides a mock function with given fields: topic, qos, retained, payload

func (*Client) Subscribe

func (_m *Client) Subscribe(topic string, qos byte, callback mqtt.MessageHandler) mqtt.Token

Subscribe provides a mock function with given fields: topic, qos, callback

func (*Client) SubscribeMultiple

func (_m *Client) SubscribeMultiple(filters map[string]byte, callback mqtt.MessageHandler) mqtt.Token

SubscribeMultiple provides a mock function with given fields: filters, callback

func (*Client) Unsubscribe

func (_m *Client) Unsubscribe(topics ...string) mqtt.Token

Unsubscribe provides a mock function with given fields: topics

type Client_AddRoute_Call

type Client_AddRoute_Call struct {
	*mock.Call
}

Client_AddRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRoute'

func (*Client_AddRoute_Call) Return

func (*Client_AddRoute_Call) Run

func (_c *Client_AddRoute_Call) Run(run func(topic string, callback mqtt.MessageHandler)) *Client_AddRoute_Call

func (*Client_AddRoute_Call) RunAndReturn

func (_c *Client_AddRoute_Call) RunAndReturn(run func(string, mqtt.MessageHandler)) *Client_AddRoute_Call

type Client_Connect_Call

type Client_Connect_Call struct {
	*mock.Call
}

Client_Connect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connect'

func (*Client_Connect_Call) Return

func (*Client_Connect_Call) Run

func (_c *Client_Connect_Call) Run(run func()) *Client_Connect_Call

func (*Client_Connect_Call) RunAndReturn

func (_c *Client_Connect_Call) RunAndReturn(run func() mqtt.Token) *Client_Connect_Call

type Client_Disconnect_Call

type Client_Disconnect_Call struct {
	*mock.Call
}

Client_Disconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disconnect'

func (*Client_Disconnect_Call) Return

func (*Client_Disconnect_Call) Run

func (_c *Client_Disconnect_Call) Run(run func(quiesce uint)) *Client_Disconnect_Call

func (*Client_Disconnect_Call) RunAndReturn

func (_c *Client_Disconnect_Call) RunAndReturn(run func(uint)) *Client_Disconnect_Call

type Client_Expecter

type Client_Expecter struct {
	// contains filtered or unexported fields
}

func (*Client_Expecter) AddRoute

func (_e *Client_Expecter) AddRoute(topic interface{}, callback interface{}) *Client_AddRoute_Call

AddRoute is a helper method to define mock.On call

  • topic string
  • callback mqtt.MessageHandler

func (*Client_Expecter) Connect

func (_e *Client_Expecter) Connect() *Client_Connect_Call

Connect is a helper method to define mock.On call

func (*Client_Expecter) Disconnect

func (_e *Client_Expecter) Disconnect(quiesce interface{}) *Client_Disconnect_Call

Disconnect is a helper method to define mock.On call

  • quiesce uint

func (*Client_Expecter) IsConnected

func (_e *Client_Expecter) IsConnected() *Client_IsConnected_Call

IsConnected is a helper method to define mock.On call

func (*Client_Expecter) IsConnectionOpen

func (_e *Client_Expecter) IsConnectionOpen() *Client_IsConnectionOpen_Call

IsConnectionOpen is a helper method to define mock.On call

func (*Client_Expecter) OptionsReader

func (_e *Client_Expecter) OptionsReader() *Client_OptionsReader_Call

OptionsReader is a helper method to define mock.On call

func (*Client_Expecter) Publish

func (_e *Client_Expecter) Publish(topic interface{}, qos interface{}, retained interface{}, payload interface{}) *Client_Publish_Call

Publish is a helper method to define mock.On call

  • topic string
  • qos byte
  • retained bool
  • payload interface{}

func (*Client_Expecter) Subscribe

func (_e *Client_Expecter) Subscribe(topic interface{}, qos interface{}, callback interface{}) *Client_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • topic string
  • qos byte
  • callback mqtt.MessageHandler

func (*Client_Expecter) SubscribeMultiple

func (_e *Client_Expecter) SubscribeMultiple(filters interface{}, callback interface{}) *Client_SubscribeMultiple_Call

SubscribeMultiple is a helper method to define mock.On call

  • filters map[string]byte
  • callback mqtt.MessageHandler

func (*Client_Expecter) Unsubscribe

func (_e *Client_Expecter) Unsubscribe(topics ...interface{}) *Client_Unsubscribe_Call

Unsubscribe is a helper method to define mock.On call

  • topics ...string

type Client_IsConnected_Call

type Client_IsConnected_Call struct {
	*mock.Call
}

Client_IsConnected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnected'

func (*Client_IsConnected_Call) Return

func (*Client_IsConnected_Call) Run

func (_c *Client_IsConnected_Call) Run(run func()) *Client_IsConnected_Call

func (*Client_IsConnected_Call) RunAndReturn

func (_c *Client_IsConnected_Call) RunAndReturn(run func() bool) *Client_IsConnected_Call

type Client_IsConnectionOpen_Call

type Client_IsConnectionOpen_Call struct {
	*mock.Call
}

Client_IsConnectionOpen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnectionOpen'

func (*Client_IsConnectionOpen_Call) Return

func (*Client_IsConnectionOpen_Call) Run

func (*Client_IsConnectionOpen_Call) RunAndReturn

func (_c *Client_IsConnectionOpen_Call) RunAndReturn(run func() bool) *Client_IsConnectionOpen_Call

type Client_OptionsReader_Call

type Client_OptionsReader_Call struct {
	*mock.Call
}

Client_OptionsReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OptionsReader'

func (*Client_OptionsReader_Call) Return

func (*Client_OptionsReader_Call) Run

func (*Client_OptionsReader_Call) RunAndReturn

type Client_Publish_Call

type Client_Publish_Call struct {
	*mock.Call
}

Client_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'

func (*Client_Publish_Call) Return

func (*Client_Publish_Call) Run

func (_c *Client_Publish_Call) Run(run func(topic string, qos byte, retained bool, payload interface{})) *Client_Publish_Call

func (*Client_Publish_Call) RunAndReturn

func (_c *Client_Publish_Call) RunAndReturn(run func(string, byte, bool, interface{}) mqtt.Token) *Client_Publish_Call

type Client_SubscribeMultiple_Call

type Client_SubscribeMultiple_Call struct {
	*mock.Call
}

Client_SubscribeMultiple_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeMultiple'

func (*Client_SubscribeMultiple_Call) Return

func (*Client_SubscribeMultiple_Call) Run

func (*Client_SubscribeMultiple_Call) RunAndReturn

type Client_Subscribe_Call

type Client_Subscribe_Call struct {
	*mock.Call
}

Client_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'

func (*Client_Subscribe_Call) Return

func (*Client_Subscribe_Call) Run

func (_c *Client_Subscribe_Call) Run(run func(topic string, qos byte, callback mqtt.MessageHandler)) *Client_Subscribe_Call

func (*Client_Subscribe_Call) RunAndReturn

type Client_Unsubscribe_Call

type Client_Unsubscribe_Call struct {
	*mock.Call
}

Client_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe'

func (*Client_Unsubscribe_Call) Return

func (*Client_Unsubscribe_Call) Run

func (_c *Client_Unsubscribe_Call) Run(run func(topics ...string)) *Client_Unsubscribe_Call

func (*Client_Unsubscribe_Call) RunAndReturn

func (_c *Client_Unsubscribe_Call) RunAndReturn(run func(...string) mqtt.Token) *Client_Unsubscribe_Call

type GDO

type GDO struct {
	mock.Mock
}

GDO is an autogenerated mock type for the GDO type

func NewGDO

func NewGDO(t interface {
	mock.TestingT
	Cleanup(func())
}) *GDO

NewGDO creates a new instance of GDO. 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 (*GDO) EXPECT

func (_m *GDO) EXPECT() *GDO_Expecter

func (*GDO) ProcessShutdown

func (_m *GDO) ProcessShutdown()

ProcessShutdown provides a mock function with given fields:

func (*GDO) SetGarageDoor

func (_m *GDO) SetGarageDoor(action string) error

SetGarageDoor provides a mock function with given fields: action

type GDO_Expecter

type GDO_Expecter struct {
	// contains filtered or unexported fields
}

func (*GDO_Expecter) ProcessShutdown

func (_e *GDO_Expecter) ProcessShutdown() *GDO_ProcessShutdown_Call

ProcessShutdown is a helper method to define mock.On call

func (*GDO_Expecter) SetGarageDoor

func (_e *GDO_Expecter) SetGarageDoor(action interface{}) *GDO_SetGarageDoor_Call

SetGarageDoor is a helper method to define mock.On call

  • action string

type GDO_ProcessShutdown_Call

type GDO_ProcessShutdown_Call struct {
	*mock.Call
}

GDO_ProcessShutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessShutdown'

func (*GDO_ProcessShutdown_Call) Return

func (*GDO_ProcessShutdown_Call) Run

func (*GDO_ProcessShutdown_Call) RunAndReturn

func (_c *GDO_ProcessShutdown_Call) RunAndReturn(run func()) *GDO_ProcessShutdown_Call

type GDO_SetGarageDoor_Call

type GDO_SetGarageDoor_Call struct {
	*mock.Call
}

GDO_SetGarageDoor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGarageDoor'

func (*GDO_SetGarageDoor_Call) Return

func (*GDO_SetGarageDoor_Call) Run

func (_c *GDO_SetGarageDoor_Call) Run(run func(action string)) *GDO_SetGarageDoor_Call

func (*GDO_SetGarageDoor_Call) RunAndReturn

func (_c *GDO_SetGarageDoor_Call) RunAndReturn(run func(string) error) *GDO_SetGarageDoor_Call

type MyqSessionInterface

type MyqSessionInterface struct {
	mock.Mock
}

MyqSessionInterface is an autogenerated mock type for the MyqSessionInterface type

func NewMyqSessionInterface

func NewMyqSessionInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MyqSessionInterface

NewMyqSessionInterface creates a new instance of MyqSessionInterface. 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 (*MyqSessionInterface) DeviceState

func (_m *MyqSessionInterface) DeviceState(serialNumber string) (string, error)

DeviceState provides a mock function with given fields: serialNumber

func (*MyqSessionInterface) EXPECT

func (*MyqSessionInterface) GetToken

func (_m *MyqSessionInterface) GetToken() string

GetToken provides a mock function with given fields:

func (*MyqSessionInterface) Login

func (_m *MyqSessionInterface) Login() error

Login provides a mock function with given fields:

func (*MyqSessionInterface) New

func (_m *MyqSessionInterface) New()

New provides a mock function with given fields:

func (*MyqSessionInterface) SetDoorState

func (_m *MyqSessionInterface) SetDoorState(serialNumber string, action string) error

SetDoorState provides a mock function with given fields: serialNumber, action

func (*MyqSessionInterface) SetPassword

func (_m *MyqSessionInterface) SetPassword(_a0 string)

SetPassword provides a mock function with given fields: _a0

func (*MyqSessionInterface) SetToken

func (_m *MyqSessionInterface) SetToken(_a0 string)

SetToken provides a mock function with given fields: _a0

func (*MyqSessionInterface) SetUsername

func (_m *MyqSessionInterface) SetUsername(_a0 string)

SetUsername provides a mock function with given fields: _a0

type MyqSessionInterface_DeviceState_Call

type MyqSessionInterface_DeviceState_Call struct {
	*mock.Call
}

MyqSessionInterface_DeviceState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeviceState'

func (*MyqSessionInterface_DeviceState_Call) Return

func (*MyqSessionInterface_DeviceState_Call) Run

func (*MyqSessionInterface_DeviceState_Call) RunAndReturn

type MyqSessionInterface_Expecter

type MyqSessionInterface_Expecter struct {
	// contains filtered or unexported fields
}

func (*MyqSessionInterface_Expecter) DeviceState

func (_e *MyqSessionInterface_Expecter) DeviceState(serialNumber interface{}) *MyqSessionInterface_DeviceState_Call

DeviceState is a helper method to define mock.On call

  • serialNumber string

func (*MyqSessionInterface_Expecter) GetToken

GetToken is a helper method to define mock.On call

func (*MyqSessionInterface_Expecter) Login

Login is a helper method to define mock.On call

func (*MyqSessionInterface_Expecter) New

New is a helper method to define mock.On call

func (*MyqSessionInterface_Expecter) SetDoorState

func (_e *MyqSessionInterface_Expecter) SetDoorState(serialNumber interface{}, action interface{}) *MyqSessionInterface_SetDoorState_Call

SetDoorState is a helper method to define mock.On call

  • serialNumber string
  • action string

func (*MyqSessionInterface_Expecter) SetPassword

func (_e *MyqSessionInterface_Expecter) SetPassword(_a0 interface{}) *MyqSessionInterface_SetPassword_Call

SetPassword is a helper method to define mock.On call

  • _a0 string

func (*MyqSessionInterface_Expecter) SetToken

func (_e *MyqSessionInterface_Expecter) SetToken(_a0 interface{}) *MyqSessionInterface_SetToken_Call

SetToken is a helper method to define mock.On call

  • _a0 string

func (*MyqSessionInterface_Expecter) SetUsername

func (_e *MyqSessionInterface_Expecter) SetUsername(_a0 interface{}) *MyqSessionInterface_SetUsername_Call

SetUsername is a helper method to define mock.On call

  • _a0 string

type MyqSessionInterface_GetToken_Call

type MyqSessionInterface_GetToken_Call struct {
	*mock.Call
}

MyqSessionInterface_GetToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetToken'

func (*MyqSessionInterface_GetToken_Call) Return

func (*MyqSessionInterface_GetToken_Call) Run

func (*MyqSessionInterface_GetToken_Call) RunAndReturn

type MyqSessionInterface_Login_Call

type MyqSessionInterface_Login_Call struct {
	*mock.Call
}

MyqSessionInterface_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'

func (*MyqSessionInterface_Login_Call) Return

func (*MyqSessionInterface_Login_Call) Run

func (*MyqSessionInterface_Login_Call) RunAndReturn

type MyqSessionInterface_New_Call

type MyqSessionInterface_New_Call struct {
	*mock.Call
}

MyqSessionInterface_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New'

func (*MyqSessionInterface_New_Call) Return

func (*MyqSessionInterface_New_Call) Run

func (*MyqSessionInterface_New_Call) RunAndReturn

func (_c *MyqSessionInterface_New_Call) RunAndReturn(run func()) *MyqSessionInterface_New_Call

type MyqSessionInterface_SetDoorState_Call

type MyqSessionInterface_SetDoorState_Call struct {
	*mock.Call
}

MyqSessionInterface_SetDoorState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDoorState'

func (*MyqSessionInterface_SetDoorState_Call) Return

func (*MyqSessionInterface_SetDoorState_Call) Run

func (*MyqSessionInterface_SetDoorState_Call) RunAndReturn

type MyqSessionInterface_SetPassword_Call

type MyqSessionInterface_SetPassword_Call struct {
	*mock.Call
}

MyqSessionInterface_SetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPassword'

func (*MyqSessionInterface_SetPassword_Call) Return

func (*MyqSessionInterface_SetPassword_Call) Run

func (*MyqSessionInterface_SetPassword_Call) RunAndReturn

type MyqSessionInterface_SetToken_Call

type MyqSessionInterface_SetToken_Call struct {
	*mock.Call
}

MyqSessionInterface_SetToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetToken'

func (*MyqSessionInterface_SetToken_Call) Return

func (*MyqSessionInterface_SetToken_Call) Run

func (*MyqSessionInterface_SetToken_Call) RunAndReturn

type MyqSessionInterface_SetUsername_Call

type MyqSessionInterface_SetUsername_Call struct {
	*mock.Call
}

MyqSessionInterface_SetUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUsername'

func (*MyqSessionInterface_SetUsername_Call) Return

func (*MyqSessionInterface_SetUsername_Call) Run

func (*MyqSessionInterface_SetUsername_Call) RunAndReturn

type Token

type Token struct {
	mock.Mock
}

Token is an autogenerated mock type for the Token type

func NewToken

func NewToken(t interface {
	mock.TestingT
	Cleanup(func())
}) *Token

NewToken creates a new instance of Token. 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 (*Token) Done

func (_m *Token) Done() <-chan struct{}

Done provides a mock function with given fields:

func (*Token) EXPECT

func (_m *Token) EXPECT() *Token_Expecter

func (*Token) Error

func (_m *Token) Error() error

Error provides a mock function with given fields:

func (*Token) Wait

func (_m *Token) Wait() bool

Wait provides a mock function with given fields:

func (*Token) WaitTimeout

func (_m *Token) WaitTimeout(_a0 time.Duration) bool

WaitTimeout provides a mock function with given fields: _a0

type Token_Done_Call

type Token_Done_Call struct {
	*mock.Call
}

Token_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done'

func (*Token_Done_Call) Return

func (_c *Token_Done_Call) Return(_a0 <-chan struct{}) *Token_Done_Call

func (*Token_Done_Call) Run

func (_c *Token_Done_Call) Run(run func()) *Token_Done_Call

func (*Token_Done_Call) RunAndReturn

func (_c *Token_Done_Call) RunAndReturn(run func() <-chan struct{}) *Token_Done_Call

type Token_Error_Call

type Token_Error_Call struct {
	*mock.Call
}

Token_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error'

func (*Token_Error_Call) Return

func (_c *Token_Error_Call) Return(_a0 error) *Token_Error_Call

func (*Token_Error_Call) Run

func (_c *Token_Error_Call) Run(run func()) *Token_Error_Call

func (*Token_Error_Call) RunAndReturn

func (_c *Token_Error_Call) RunAndReturn(run func() error) *Token_Error_Call

type Token_Expecter

type Token_Expecter struct {
	// contains filtered or unexported fields
}

func (*Token_Expecter) Done

func (_e *Token_Expecter) Done() *Token_Done_Call

Done is a helper method to define mock.On call

func (*Token_Expecter) Error

func (_e *Token_Expecter) Error() *Token_Error_Call

Error is a helper method to define mock.On call

func (*Token_Expecter) Wait

func (_e *Token_Expecter) Wait() *Token_Wait_Call

Wait is a helper method to define mock.On call

func (*Token_Expecter) WaitTimeout

func (_e *Token_Expecter) WaitTimeout(_a0 interface{}) *Token_WaitTimeout_Call

WaitTimeout is a helper method to define mock.On call

  • _a0 time.Duration

type Token_WaitTimeout_Call

type Token_WaitTimeout_Call struct {
	*mock.Call
}

Token_WaitTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitTimeout'

func (*Token_WaitTimeout_Call) Return

func (*Token_WaitTimeout_Call) Run

func (*Token_WaitTimeout_Call) RunAndReturn

func (_c *Token_WaitTimeout_Call) RunAndReturn(run func(time.Duration) bool) *Token_WaitTimeout_Call

type Token_Wait_Call

type Token_Wait_Call struct {
	*mock.Call
}

Token_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait'

func (*Token_Wait_Call) Return

func (_c *Token_Wait_Call) Return(_a0 bool) *Token_Wait_Call

func (*Token_Wait_Call) Run

func (_c *Token_Wait_Call) Run(run func()) *Token_Wait_Call

func (*Token_Wait_Call) RunAndReturn

func (_c *Token_Wait_Call) RunAndReturn(run func() bool) *Token_Wait_Call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL