Ejemplo n.º 1
0
        public void TestGetTotal()
        {
            //setup
            NuWayOrderForm form = new NuWayOrderForm();
            form.prices.Clear();

            form.prices.Add(1.02);
            form.prices.Add(2.33);
            form.prices.Add(3.40);
            form.prices.Add(4.50);

            //action
            double total = form.getTotal();

            //check
            Assert.AreEqual(total, 11.25, "GetTotal method not adding correctly.");
        }