Skip to content

Commit

Permalink
Minor clean up in Inventory Service
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrenze committed Dec 14, 2016
1 parent 6ab726c commit a773816
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Infrastructure/Inventory/InventoryService.cs
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion Infrastructure/Inventory/InventoryServiceTests.cs
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions Infrastructure/Network/WebClientWrapper.cs
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit a773816

Please sign in to comment.