diff options
Diffstat (limited to 'pkg/kafkacomm/mocks/kafkaproducerinterface.go')
-rw-r--r-- | pkg/kafkacomm/mocks/kafkaproducerinterface.go | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkg/kafkacomm/mocks/kafkaproducerinterface.go b/pkg/kafkacomm/mocks/kafkaproducerinterface.go new file mode 100644 index 0000000..97b6f53 --- /dev/null +++ b/pkg/kafkacomm/mocks/kafkaproducerinterface.go @@ -0,0 +1,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 +} |