コード例 #1
0
        public void DeterminePriceTest()
        {
            Vehicle v     = new Vehicle("t", "c", 1, "m", "m2", false, false, 50, "m");
            int     price = VehicleControl.DeterminePrice(v);

            Assert.AreEqual(price, v.Rate * 100);
        }
コード例 #2
0
 /// <summary>
 /// updates the information displaying the purchase cost.
 /// </summary>
 private void UpdatePurchaseInfo()
 {
     carInfoLabel.Text     = _vehicleToPayFor.ToString();
     moneyAmountLabel.Text =
         VehicleControl.DeterminePrice(_vehicleToPayFor).ToString();
 }