Beispiel #1
0
        private double GetAverageSpeedOfMotorcycle(IMotorcycleDataStructure motorcycle)
        {
            int numberOfStraightLineParts = _inputOutputSystem.GetNumberOfStraightLinesInCircuit(_pathToCircuitFile);
            int numberOfCurveLineParts    = _inputOutputSystem.GetNumberOfCurvesInCircuit(_pathToCircuitFile);

            double result = numberOfStraightLineParts * motorcycle.GetMaxSpeedInStraightLineOfMotorcycle() +
                            numberOfCurveLineParts * motorcycle.GetMaxSpeedInCurveOfMotorcycle();

            return(result);
        }
 public void Test_GetNumberOfStraightLinesInCircuit_()
 {
     Assert.True(_inputOutputSystem.GetNumberOfStraightLinesInCircuit(_pathToCircuitFile) == 8);
 }