Skip to content

Instantly share code, notes, and snippets.

@explorer14

explorer14/Boostrapping.cs Secret

Last active Aug 27, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.