aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/kafkacomm/mocks/kafkaproducerinterface.go
blob: 97b6f53ca9c31b98ae08085e2b2b32f33107c53d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Code generated by mockery v2.46.3. DO NOT EDIT.

package mocks

import (
	kafka "github.com/confluentinc/confluent-kafka-go/kafka"

	mock "github.com/stretchr/testify/mock"
)

// KafkaProducerInterface is an autogenerated mock type for the KafkaProducerInterface type
type KafkaProducerInterface struct {
	mock.Mock
}

// Close provides a mock function with given fields:
func (_m *KafkaProducerInterface) Close() {
	_m.Called()
}

// Produce provides a mock function with given fields: _a0, _a1
func (_m *KafkaProducerInterface) Produce(_a0 *kafka.Message, _a1 chan kafka.Event) error {
	ret := _m.Called(_a0, _a1)

	if len(ret) == 0 {
		panic("no return value specified for Produce")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(*kafka.Message, chan kafka.Event) error); ok {
		r0 = rf(_a0, _a1)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// NewKafkaProducerInterface creates a new instance of KafkaProducerInterface. 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 NewKafkaProducerInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *KafkaProducerInterface {
	mock := &KafkaProducerInterface{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}