You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SendEvents is public method of Sender interface, so it is part of public API.
Problem
Now public API is doesn't allow to test that message is built correctly, because SendEvents has only error in return params. How to check that message is built correctly?
Quick solution (current solution)
Now we have test of internal methods buildMessage and sendMessage.
Right solution (TODO)
Need to separate interface method SendEvents to two methods - BuildMessage and SendMessage - to test methods separately as public API. Also method doesn't fit SRP, because it has two reasons to change, for example when need to change message format and need to change delivery of message.
The text was updated successfully, but these errors were encountered:
Overview
We have Sender interface with SendEvents method.
SendEvents is public method of Sender interface, so it is part of public API.
Problem
Now public API is doesn't allow to test that message is built correctly, because SendEvents has only error in return params. How to check that message is built correctly?
Quick solution (current solution)
Now we have test of internal methods buildMessage and sendMessage.
Right solution (TODO)
Need to separate interface method SendEvents to two methods - BuildMessage and SendMessage - to test methods separately as public API. Also method doesn't fit SRP, because it has two reasons to change, for example when need to change message format and need to change delivery of message.
The text was updated successfully, but these errors were encountered: