示例#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_GetNumberOfCurvesInCircuit_()
 {
     Assert.True(_inputOutputSystem.GetNumberOfCurvesInCircuit(_pathToCircuitFile) == 10);
 }