コード例 #1
0
        public void RemovePoints()
        {
            Driver driver     = new F1("jabir", "f1", 76);
            int    percentage = 10;

            driver.Performence = 80;

            driver.RemovePoints(driver, percentage);

            Assert.AreEqual(70, driver.Performence);
        }
コード例 #2
0
        public void RemovePoints_PerformanceShouldNotBeUnder0()
        {
            Driver driver     = new F1("jabir", "f1", 76);
            int    percentage = 40;

            driver.Performence = 20;

            driver.RemovePoints(driver, percentage);

            Assert.AreEqual(0, driver.Performence);
        }