Documentation ¶
Index ¶
- type InitialiserMock
- func (mock *InitialiserMock) DoGetConsumer(contextMoqParam context.Context, s1 string, s2 string, ...) (kafka.IConsumerGroup, error)
- func (mock *InitialiserMock) DoGetConsumerCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetGraphDB(contextMoqParam context.Context) (*graph.DB, error)
- func (mock *InitialiserMock) DoGetGraphDBCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetHealthCheck(configMoqParam *config.Config, s1 string, s2 string, s3 string) (healthcheck.HealthCheck, error)
- func (mock *InitialiserMock) DoGetHealthCheckCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetImportErrorReporter(kafkaProducer reporter.KafkaProducer, s string) (reporter.ImportErrorReporter, error)
- func (mock *InitialiserMock) DoGetImportErrorReporterCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetProducer(contextMoqParam context.Context, s string, kafkaConfig *config.KafkaConfig) (kafka.IProducer, error)
- func (mock *InitialiserMock) DoGetProducerCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitialiserMock ¶
type InitialiserMock struct { // DoGetConsumerFunc mocks the DoGetConsumer method. DoGetConsumerFunc func(contextMoqParam context.Context, s1 string, s2 string, kafkaConfig *config.KafkaConfig) (kafka.IConsumerGroup, error) // DoGetGraphDBFunc mocks the DoGetGraphDB method. DoGetGraphDBFunc func(contextMoqParam context.Context) (*graph.DB, error) // DoGetHealthCheckFunc mocks the DoGetHealthCheck method. DoGetHealthCheckFunc func(configMoqParam *config.Config, s1 string, s2 string, s3 string) (healthcheck.HealthCheck, error) // DoGetImportErrorReporterFunc mocks the DoGetImportErrorReporter method. DoGetImportErrorReporterFunc func(kafkaProducer reporter.KafkaProducer, s string) (reporter.ImportErrorReporter, error) // DoGetProducerFunc mocks the DoGetProducer method. DoGetProducerFunc func(contextMoqParam context.Context, s string, kafkaConfig *config.KafkaConfig) (kafka.IProducer, error) // contains filtered or unexported fields }
InitialiserMock is a mock implementation of initialise.Initialiser.
func TestSomethingThatUsesInitialiser(t *testing.T) { // make and configure a mocked initialise.Initialiser mockedInitialiser := &InitialiserMock{ DoGetConsumerFunc: func(contextMoqParam context.Context, s1 string, s2 string, kafkaConfig *config.KafkaConfig) (kafka.IConsumerGroup, error) { panic("mock out the DoGetConsumer method") }, DoGetGraphDBFunc: func(contextMoqParam context.Context) (*graph.DB, error) { panic("mock out the DoGetGraphDB method") }, DoGetHealthCheckFunc: func(configMoqParam *config.Config, s1 string, s2 string, s3 string) (healthcheck.HealthCheck, error) { panic("mock out the DoGetHealthCheck method") }, DoGetImportErrorReporterFunc: func(kafkaProducer reporter.KafkaProducer, s string) (reporter.ImportErrorReporter, error) { panic("mock out the DoGetImportErrorReporter method") }, DoGetProducerFunc: func(contextMoqParam context.Context, s string, kafkaConfig *config.KafkaConfig) (kafka.IProducer, error) { panic("mock out the DoGetProducer method") }, } // use mockedInitialiser in code that requires initialise.Initialiser // and then make assertions. }
func (*InitialiserMock) DoGetConsumer ¶
func (mock *InitialiserMock) DoGetConsumer(contextMoqParam context.Context, s1 string, s2 string, kafkaConfig *config.KafkaConfig) (kafka.IConsumerGroup, error)
DoGetConsumer calls DoGetConsumerFunc.
func (*InitialiserMock) DoGetConsumerCalls ¶
func (mock *InitialiserMock) DoGetConsumerCalls() []struct { ContextMoqParam context.Context S1 string S2 string KafkaConfig *config.KafkaConfig }
DoGetConsumerCalls gets all the calls that were made to DoGetConsumer. Check the length with:
len(mockedInitialiser.DoGetConsumerCalls())
func (*InitialiserMock) DoGetGraphDB ¶
DoGetGraphDB calls DoGetGraphDBFunc.
func (*InitialiserMock) DoGetGraphDBCalls ¶
func (mock *InitialiserMock) DoGetGraphDBCalls() []struct { ContextMoqParam context.Context }
DoGetGraphDBCalls gets all the calls that were made to DoGetGraphDB. Check the length with:
len(mockedInitialiser.DoGetGraphDBCalls())
func (*InitialiserMock) DoGetHealthCheck ¶
func (mock *InitialiserMock) DoGetHealthCheck(configMoqParam *config.Config, s1 string, s2 string, s3 string) (healthcheck.HealthCheck, error)
DoGetHealthCheck calls DoGetHealthCheckFunc.
func (*InitialiserMock) DoGetHealthCheckCalls ¶
func (mock *InitialiserMock) DoGetHealthCheckCalls() []struct { ConfigMoqParam *config.Config S1 string S2 string S3 string }
DoGetHealthCheckCalls gets all the calls that were made to DoGetHealthCheck. Check the length with:
len(mockedInitialiser.DoGetHealthCheckCalls())
func (*InitialiserMock) DoGetImportErrorReporter ¶
func (mock *InitialiserMock) DoGetImportErrorReporter(kafkaProducer reporter.KafkaProducer, s string) (reporter.ImportErrorReporter, error)
DoGetImportErrorReporter calls DoGetImportErrorReporterFunc.
func (*InitialiserMock) DoGetImportErrorReporterCalls ¶
func (mock *InitialiserMock) DoGetImportErrorReporterCalls() []struct { KafkaProducer reporter.KafkaProducer S string }
DoGetImportErrorReporterCalls gets all the calls that were made to DoGetImportErrorReporter. Check the length with:
len(mockedInitialiser.DoGetImportErrorReporterCalls())
func (*InitialiserMock) DoGetProducer ¶
func (mock *InitialiserMock) DoGetProducer(contextMoqParam context.Context, s string, kafkaConfig *config.KafkaConfig) (kafka.IProducer, error)
DoGetProducer calls DoGetProducerFunc.
func (*InitialiserMock) DoGetProducerCalls ¶
func (mock *InitialiserMock) DoGetProducerCalls() []struct { ContextMoqParam context.Context S string KafkaConfig *config.KafkaConfig }
DoGetProducerCalls gets all the calls that were made to DoGetProducer. Check the length with:
len(mockedInitialiser.DoGetProducerCalls())