This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void RegisterServices() | |
{ | |
// while running the service locally, mock external call | |
// so it always succeeds (as long as it | |
// itself is not the subject of the test) | |
var isDevelopmentEnvironment = DetermineCurrentEnvironment(); | |
if (isDevelopmentEnvironment) | |
webserviceContainer.Register<ICancelPurchaseOrderLine, | |
AlwaysCancelPurchaseOrderLineSuccessfully>(); | |
else // otherwise use the actual live web service adapter | |
webserviceContainer.Register<ICancelPurchaseOrderLine, | |
RealPurchaseOrderService>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment