public void Calculate_Total_By_CartId() { var shoppingCartController = new ShoppingCartController(_shoppingCartManager, null); var cartCustomerDto = GenerateCreateCartDto(); var actionResult = shoppingCartController.Create(cartCustomerDto); var result = actionResult.Result as CreatedAtRouteResult; var shoppingCart = result?.Value as ShoppingCartDto; var item = shoppingCartController.CalculateTotals(shoppingCart?.Id); item.Value.Total.Should().Be(59.4); }