TOTD stands for think of the developer and I feel its something that the commerce team should have as an objective. As a company, we are new to Episerver Commerce but it seems that we have to do way too much work to unit test our commerce code. This article will describe how we went about unit testing update quantity cart code. So lets look at the code to update the quantity of an item in the basket.
Ok, so we need to mock CartHelper, but its a static method, so we need to write a cart wrapper and inject that into the class we want to test.