Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md Add README for mocks subpackage Mar 17, 2015
async_producer.go
async_producer_test.go Move a method used only in tests into the test file Jul 6, 2016
consumer.go Fix comment for mocks.NewConsumer Jun 3, 2017
consumer_test.go Revert "Synced error names and descriptions with the kafka's protocol" Jan 23, 2019
mocks.go Move a method used only in tests into the test file Jul 6, 2016
sync_producer.go Proper mock expectations in SyncProducer.SendMessages Feb 6, 2018
sync_producer_test.go Increase test coverage of SyncProducer Feb 6, 2018

README.md

sarama/mocks

The mocks subpackage includes mock implementations that implement the interfaces of the major sarama types. You can use them to test your sarama applications using dependency injection.

The following mock objects are available:

The mocks allow you to set expectations on them. When you close the mocks, the expectations will be verified, and the results will be reported to the *testing.T object you provided when creating the mock.