public ActionResult CreateCalculate(int id) { Log.Log.For(this).Info("Start get controller for CreateCalculate"); DataCalculate model = new DataCalculate(); model.id = id; model.valueBox = Calc.CalcMax(t_d.GetComponentForCalculate(id)); ViewBag.id = id; Log.Log.For(this).Info(" " + model.valueBox); return(View(model)); }
public void testMax() { Calculate calc = new Calculate(); Component comp = new Component(); List <Component> list = new List <Component>(); comp.name = "Test"; comp.quantityInStockNow = 500; comp.quantityInProduct = 5; comp.quantityInStockAfter = 0; list.Add(comp); Assert.AreEqual(500 / 5, calc.CalcMax(list)); }