diff --git a/Infrastructure/Inventory/InventoryService.cs b/Infrastructure/Inventory/InventoryService.cs index ef91364..50ec400 100644 --- a/Infrastructure/Inventory/InventoryService.cs +++ b/Infrastructure/Inventory/InventoryService.cs @@ -10,7 +10,7 @@ public class InventoryService : IInventoryService { // Note: these are hard coded to keep the demo simple - private const string AddressTemplate = "http://abc.com/inventory/products/{0}/notifysaleoccured/"; + private const string AddressTemplate = "http://abc123.com/inventory/products/{0}/notifysaleoccured/"; private const string JsonTemplate = "{{\"quantity\": {0}}}"; private readonly IWebClientWrapper _client; @@ -24,7 +24,7 @@ public void NotifySaleOcurred(int productId, int quantity) { var address = string.Format(AddressTemplate, productId); - var json = string.Format(JsonTemplate, quantity.ToString()); + var json = string.Format(JsonTemplate, quantity); _client.Post(address, json); } diff --git a/Infrastructure/Inventory/InventoryServiceTests.cs b/Infrastructure/Inventory/InventoryServiceTests.cs index 749fec7..ed81121 100644 --- a/Infrastructure/Inventory/InventoryServiceTests.cs +++ b/Infrastructure/Inventory/InventoryServiceTests.cs @@ -14,7 +14,7 @@ public class InventoryServiceTests private InventoryService _service; private AutoMoqer _mocker; - private const string Address = "http://abc.com/inventory/products/1/notifysaleoccured/"; + private const string Address = "http://abc123.com/inventory/products/1/notifysaleoccured/"; private const string Json = "{\"quantity\": 2}"; [SetUp] diff --git a/Infrastructure/Network/WebClientWrapper.cs b/Infrastructure/Network/WebClientWrapper.cs index 4bf02d9..5f3d399 100644 --- a/Infrastructure/Network/WebClientWrapper.cs +++ b/Infrastructure/Network/WebClientWrapper.cs @@ -15,6 +15,7 @@ public void Post(string address, string json) // Note: This next line is commented out to prevent an // Note: actual HTTP call, since this is just a demo app. + // client.UploadString(address, "POST", json); } }