using LegacyUnitTesting.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LegacyUnitTesting.Controllers
{
    public class ShippingManager : Controller
    {
        public static decimal SalesTax = 0.13m;

        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult ShipProduct(IProduct prod, int qty, ShippingUrgency urg, ShippingMethod meth)
        {
            ShippingCostCalculator scc = new ShippingCostCalculator();
            decimal shipCost = scc.CalcShipping(prod, qty, urg, meth, SalesTax);

            //…more code…
            ShipAcceptModel model = new ShipAcceptModel();
            model.ShipCost = shipCost;
            return View(model);
        }                
    }
}