예제 #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 TestUpdateAvgFuelPrice()
        {
            MainForm testForm = new MainForm();

            float actual = testForm.updateAvgFuelPrice(testForm.getDataGridViewTesting());
            float expected = 94f;
            Assert.AreEqual(expected, actual, 0.001, "Incorrect Avg Fuel Price");
        }
예제 #4
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");
        }
예제 #5
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");
        }
예제 #6
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");
        }