public void DeleteShoppingCart_Throws_ForUnknownUser()
{
var shoppingCartRepository = new MockShoppingCartRepository();
shoppingCartRepository.DeleteDelegate = s => false;
HttpResponseException caughtException = null;
var target = new ShoppingCartController(shoppingCartRepository, new MockProductRepository());
try
{
target.DeleteShoppingCart("UnknownUser");
}
catch (HttpResponseException ex)
{
caughtException = ex;
}
Assert.AreEqual(System.Net.HttpStatusCode.NotFound, caughtException.Response.StatusCode);
}