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
Our client types should support being decorated/mocked by customers to be able to unit tests their code without running against a live service or having to wrap our type to make them unit-testable.
Couple things that come to mind:
There should be a way for customer to avoid all network comunication
Client methods should be virtual or available on an interface so they can be overriden
Data objects should allow setting all properties (via protected setters or a different set of constructors) to allow simulating server responses
Another solution to this is to tell customers to replace the transport and simulate the services on HTTP level but this might be very complicated because it involves capturing real responses and dealing with protocol details.
Our client types should support being decorated/mocked by customers to be able to unit tests their code without running against a live service or having to wrap our type to make them unit-testable.
Couple things that come to mind:
Another solution to this is to tell customers to replace the transport and simulate the services on HTTP level but this might be very complicated because it involves capturing real responses and dealing with protocol details.
Related issues:
Azure/azure-sdk#18
Azure/azure-storage-net#465
#3968
#6
https://github.com/Azure/azure-storage-net/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+mock
cc @maririos @KrzysztofCwalina @AlexGhiondea
The text was updated successfully, but these errors were encountered: