示例#1
0
        public void TestUpdateTotalDistance()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateTotalDistance(testForm.getDataGridViewTesting());
            float expected = 3294;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Total Distance");
        }
示例#2
0
        public void TestUpdateDistBtwnFill()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateDistBtwnFill(testForm.getDataGridViewTesting());
            float expected = 326.6666667f;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Avg Dist Between Fills");
        }
示例#3
0
        public void TestUpdateAvgMPG()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateAvgMPG(3294,551);
            float expected = 14.0616f;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect MPG Conversion");
        }
示例#4
0
        public void TestUpdateAvgLHKM()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateAvgLHKM(551,3294);
            float expected = 16.72738312f;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect LHKM Formula");
        }
示例#5
0
        public void TestUpdateAvgFuelPrice()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateAvgFuelPrice(testForm.getDataGridViewTesting());
            float expected = 94f;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Avg Fuel Price");
        }
示例#6
0
        public void TestUpdateAvgFillCost()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateAvgFillCost(testForm.getDataGridViewTesting());
            float expected = 46.5315f;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Avg Fill Cost");
        }
示例#7
0
        public void TestUpdateYearDist()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateYearDist(testForm.getDataGridViewTesting());
            float expected = 980;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Year Dist");
        }
示例#8
0
        public void TestUpdateTotalFuelCons()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateTotalFuelCons(testForm.getDataGridViewTesting());
            float expected = 551;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Total Fuel Consumption");
        }