mock_tracesddataconsumer.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package azureblobreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver"
  4. import (
  5. context "context"
  6. mock "github.com/stretchr/testify/mock"
  7. consumer "go.opentelemetry.io/collector/consumer"
  8. )
  9. type mockTracesDataConsumer struct {
  10. mock.Mock
  11. }
  12. // ConsumeTracesJSON provides a mock function with given fields: ctx, json
  13. func (_m *mockTracesDataConsumer) consumeTracesJSON(ctx context.Context, json []byte) error {
  14. ret := _m.Called(ctx, json)
  15. var r0 error
  16. if rf, ok := ret.Get(0).(func(context.Context, []byte) error); ok {
  17. r0 = rf(ctx, json)
  18. } else {
  19. r0 = ret.Error(0)
  20. }
  21. return r0
  22. }
  23. // SetNextTracesConsumer provides a mock function with given fields: nextracesConsumer
  24. func (_m *mockTracesDataConsumer) setNextTracesConsumer(nextracesConsumer consumer.Traces) {
  25. _m.Called(nextracesConsumer)
  26. }
  27. func newMockTracesDataConsumer() *mockTracesDataConsumer {
  28. tracesDataConsumer := &mockTracesDataConsumer{}
  29. tracesDataConsumer.On("consumeTracesJSON", mock.Anything, mock.Anything).Return(nil)
  30. return tracesDataConsumer
  31. }