public ActionResult Create(int length, int width, int height, int weight, int volume, int cost) { Parcel myParcel = new Parcel(length, width, weight, height); myParcel.CalculateVolume(); myParcel.CostToShip(); return(RedirectToAction("Index")); }
public void CalculateVolume_CalculatesVolume_Int() { Parcel package = new Parcel(); package.SetHeight(20); package.SetWidth(50); package.SetLength(10); package.CalculateVolume(); Assert.AreEqual(10000, package.GetTotalVolume()); }
public ActionResult ParcelResults(string name, int weight, int height, int length, int width) { Parcel package = new Parcel(); package.SetSender(name); package.SetWeight(weight); package.SetHeight(height); package.SetLength(length); package.SetWidth(width); package.CalculateVolume(); package.CalculateCost(); package.SaveParcel(); return(View(Parcel.GetAll())); }