mocks

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAPIClient

type MockAPIClient struct {
	mock.Mock
}

MockAPIClient is an autogenerated mock type for the APIClient type

func NewMockAPIClient

func NewMockAPIClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAPIClient

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

func (_m *MockAPIClient) EXPECT() *MockAPIClient_Expecter

func (*MockAPIClient) SendMessageEvent

func (_m *MockAPIClient) SendMessageEvent(ctx context.Context, roomID id.RoomID, eventType event.Type, contentJSON interface{}, extra ...mautrix.ReqSendEvent) (*mautrix.RespSendEvent, error)

SendMessageEvent provides a mock function with given fields: ctx, roomID, eventType, contentJSON, extra

type MockAPIClient_Expecter

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

func (*MockAPIClient_Expecter) SendMessageEvent

func (_e *MockAPIClient_Expecter) SendMessageEvent(ctx interface{}, roomID interface{}, eventType interface{}, contentJSON interface{}, extra ...interface{}) *MockAPIClient_SendMessageEvent_Call

SendMessageEvent is a helper method to define mock.On call

  • ctx context.Context
  • roomID id.RoomID
  • eventType event.Type
  • contentJSON interface{}
  • extra ...mautrix.ReqSendEvent

type MockAPIClient_SendMessageEvent_Call

type MockAPIClient_SendMessageEvent_Call struct {
	*mock.Call
}

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

func (*MockAPIClient_SendMessageEvent_Call) Return

func (*MockAPIClient_SendMessageEvent_Call) Run

func (_c *MockAPIClient_SendMessageEvent_Call) Run(run func(ctx context.Context, roomID id.RoomID, eventType event.Type, contentJSON interface{}, extra ...mautrix.ReqSendEvent)) *MockAPIClient_SendMessageEvent_Call

func (*MockAPIClient_SendMessageEvent_Call) RunAndReturn

Jump to

Keyboard shortcuts

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