コード例 #1
0
        public void CalculateFareReturnsTotalFareOfMultipleRides()
        {
            //// Generating object of class
            InvoiceGenerator invoice = new InvoiceGenerator();

            //// Calculating fare by passing the values of distance = 10 KM and
            ///minutes = 60 minutes
            double[] distance = new double[] { 10, 20 };
            int[]    minute   = new int[] { 60, 70 };
            double   actual   = invoice.CalculateMultipleFare(distance, minute);
            double   expected = 440;

            ////Checking if the test case passes
            Assert.AreEqual(expected, actual);
        }