21 lines
465 B
Go
21 lines
465 B
Go
package mocks
|
|
|
|
import (
|
|
"alfred/cmd/ingester/app/service/interfaces"
|
|
kafka "alfred/pkg/kafka/produce"
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
type MockWebClientFactory struct {
|
|
mock.Mock
|
|
}
|
|
|
|
func (m *MockWebClientFactory) Initialize(producer kafka.KProducer) {
|
|
m.Called(producer)
|
|
}
|
|
|
|
func (m *MockWebClientFactory) CreateWebClient(client string) (interfaces.WebClient, error) {
|
|
args := m.Called(client)
|
|
return args.Get(0).(interfaces.WebClient), args.Error(1)
|
|
}
|