mocks

package
v1.33.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 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 MockReceiver

type MockReceiver[T interface{}] struct {
	mock.Mock
}

MockReceiver is an autogenerated mock type for the Receiver type

func NewMockReceiver

func NewMockReceiver[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReceiver[T]

NewMockReceiver creates a new instance of MockReceiver. 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 (*MockReceiver[T]) Send

func (_m *MockReceiver[T]) Send(ctx context.Context, event T)

Send provides a mock function with given fields: ctx, event

type MockSource

type MockSource[T interface{}] struct {
	mock.Mock
}

MockSource is an autogenerated mock type for the Source type

func NewMockSource

func NewMockSource[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSource[T]

NewMockSource creates a new instance of MockSource. 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 (*MockSource[T]) Send

func (_m *MockSource[T]) Send(ctx context.Context, event T)

Send provides a mock function with given fields: ctx, event

func (*MockSource[T]) Subscribe

func (_m *MockSource[T]) Subscribe(ctx context.Context, subscriber eventbus.Subscriber[T], onUnsubscribe func()) eventbus.UnsubscribeFunc

Subscribe provides a mock function with given fields: ctx, subscriber, onUnsubscribe

func (*MockSource[T]) Subscribers

func (_m *MockSource[T]) Subscribers() int

Subscribers provides a mock function with given fields:

type MockSubscriber

type MockSubscriber[T interface{}] struct {
	mock.Mock
}

MockSubscriber is an autogenerated mock type for the Subscriber type

func NewMockSubscriber

func NewMockSubscriber[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSubscriber[T]

NewMockSubscriber creates a new instance of MockSubscriber. 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 (*MockSubscriber[T]) Channel

func (_m *MockSubscriber[T]) Channel() <-chan T

Channel provides a mock function with given fields:

func (*MockSubscriber[T]) Close

func (_m *MockSubscriber[T]) Close()

Close provides a mock function with given fields:

func (*MockSubscriber[T]) Receive

func (_m *MockSubscriber[T]) Receive(event T)

Receive provides a mock function with given fields: event

Jump to

Keyboard shortcuts

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