mocks

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.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 Handler

type Handler struct {
	mock.Mock
}

Handler is an autogenerated mock type for the Handler type

func NewHandler

func NewHandler(t mockConstructorTestingTNewHandler) *Handler

NewHandler creates a new instance of Handler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Handler) Finalize

func (_m *Handler) Finalize(logger log.Logger) (types.Handler, error)

Finalize provides a mock function with given fields: logger

func (*Handler) GetRequiredMessageCount

func (_m *Handler) GetRequiredMessageCount() uint32

GetRequiredMessageCount provides a mock function with given fields:

func (*Handler) HandleMessage

func (_m *Handler) HandleMessage(logger log.Logger, msg types.Message) error

HandleMessage provides a mock function with given fields: logger, msg

func (*Handler) IsHandled

func (_m *Handler) IsHandled(logger log.Logger, id string) bool

IsHandled provides a mock function with given fields: logger, id

func (*Handler) MessageType

func (_m *Handler) MessageType() types.MessageType

MessageType provides a mock function with given fields:

type Message

type Message struct {
	mock.Mock
}

Message is an autogenerated mock type for the Message type

func NewMessage

func NewMessage(t mockConstructorTestingTNewMessage) *Message

NewMessage creates a new instance of Message. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Message) GetId

func (_m *Message) GetId() string

GetId provides a mock function with given fields:

func (*Message) GetMessageType

func (_m *Message) GetMessageType() types.MessageType

GetMessageType provides a mock function with given fields:

func (*Message) IsValid

func (_m *Message) IsValid() bool

IsValid provides a mock function with given fields:

type MessageMain

type MessageMain struct {
	mock.Mock
}

MessageMain is an autogenerated mock type for the MessageMain type

func NewMessageMain

func NewMessageMain(t mockConstructorTestingTNewMessageMain) *MessageMain

NewMessageMain creates a new instance of MessageMain. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MessageMain) AddMessage

func (_m *MessageMain) AddMessage(senderId string, msg types.Message) error

AddMessage provides a mock function with given fields: senderId, msg

func (*MessageMain) GetHandler

func (_m *MessageMain) GetHandler() types.Handler

GetHandler provides a mock function with given fields:

func (*MessageMain) GetState

func (_m *MessageMain) GetState() types.MainState

GetState provides a mock function with given fields:

func (*MessageMain) Start

func (_m *MessageMain) Start()

Start provides a mock function with given fields:

func (*MessageMain) Stop

func (_m *MessageMain) Stop()

Stop provides a mock function with given fields:

type PeerManager

type PeerManager struct {
	mock.Mock
}

PeerManager is an autogenerated mock type for the PeerManager type

func NewPeerManager

func NewPeerManager(t mockConstructorTestingTNewPeerManager) *PeerManager

NewPeerManager creates a new instance of PeerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PeerManager) MustSend

func (_m *PeerManager) MustSend(id string, msg interface{})

MustSend provides a mock function with given fields: id, msg

func (*PeerManager) NumPeers

func (_m *PeerManager) NumPeers() uint32

NumPeers provides a mock function with given fields:

func (*PeerManager) PeerIDs

func (_m *PeerManager) PeerIDs() []string

PeerIDs provides a mock function with given fields:

func (*PeerManager) SelfID

func (_m *PeerManager) SelfID() string

SelfID provides a mock function with given fields:

type StateChangedListener

type StateChangedListener struct {
	mock.Mock
}

StateChangedListener is an autogenerated mock type for the StateChangedListener type

func NewStateChangedListener

func NewStateChangedListener(t mockConstructorTestingTNewStateChangedListener) *StateChangedListener

NewStateChangedListener creates a new instance of StateChangedListener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*StateChangedListener) OnStateChanged

func (_m *StateChangedListener) OnStateChanged(oldState types.MainState, newState types.MainState)

OnStateChanged provides a mock function with given fields: oldState, newState

Jump to

Keyboard shortcuts

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