mocks

package
v0.0.0-...-db89a07 Latest Latest
Warning

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

Go to latest
Published: May 28, 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 Builder

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

func NewBuilder

func NewBuilder(conn *Connection) *Builder

func (*Builder) Build

func (b *Builder) Build() natsconnection.Interface

type Connection

type Connection struct {
	mock.Mock
}

Connection is an autogenerated mock type for the Interface type

func NewConnection

func NewConnection(t interface {
	mock.TestingT
	Cleanup(func())
}) *Connection

NewConnection creates a new instance of Connection. 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 (*Connection) Connect

func (_m *Connection) Connect(handler nats.ConnHandler, errorHandler nats.ConnErrHandler) error

Connect provides a mock function with given fields: handler, errorHandler

func (*Connection) Disconnect

func (_m *Connection) Disconnect()

Disconnect provides a mock function with given fields:

func (*Connection) EXPECT

func (_m *Connection) EXPECT() *Connection_Expecter

type Connection_Connect_Call

type Connection_Connect_Call struct {
	*mock.Call
}

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

func (*Connection_Connect_Call) Return

func (*Connection_Connect_Call) Run

func (_c *Connection_Connect_Call) Run(run func(handler nats.ConnHandler, errorHandler nats.ConnErrHandler)) *Connection_Connect_Call

func (*Connection_Connect_Call) RunAndReturn

type Connection_Disconnect_Call

type Connection_Disconnect_Call struct {
	*mock.Call
}

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

func (*Connection_Disconnect_Call) Return

func (*Connection_Disconnect_Call) Run

func (*Connection_Disconnect_Call) RunAndReturn

func (_c *Connection_Disconnect_Call) RunAndReturn(run func()) *Connection_Disconnect_Call

type Connection_Expecter

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

func (*Connection_Expecter) Connect

func (_e *Connection_Expecter) Connect(handler interface{}, errorHandler interface{}) *Connection_Connect_Call

Connect is a helper method to define mock.On call

  • handler nats.ConnHandler
  • errorHandler nats.ConnErrHandler

func (*Connection_Expecter) Disconnect

Disconnect is a helper method to define mock.On call

Jump to

Keyboard shortcuts

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