-
Notifications
You must be signed in to change notification settings - Fork 1
Ease producer testing #36
Comments
Thanks for raising that @sixstone-qq - I hadn't really considered that you wouldn't just trust it to do the right thing as downstream user. We provide quite a bit of test coverage within the project. |
What we are testing here is the code between the service and felice so we are sure what felice receives is correct, so our function is likely to be like that:
So we want to test is sender code. |
@sixstone-qq so you want to test that (in the above example) |
There are cases where two or more different |
As a user of
felice
, which is great, by the way, I'd like to test what I'm actually sending, that is,topic
,body
andkey
. I am using a mock of the producerSend
function, which looks like that:The last part is almost impossible to write it without knowing all insights of library. Is there any better way to test it given the previous constraint? If so, I'd love to have it documented in godoc, if not, a helper would be great :)
The text was updated successfully, but these errors were encountered: