コード例 #1
0
        public void Accelerate_ShouldCallAccelerateOnBaseMode_WhenCurrentAngularSpeedIsLesserThanCutOffAngularSpeed()
        {
            var currentAngularSpeed = new AngularSpeed(40d);

            _externalSystems.GetAngularSpeed().Returns(currentAngularSpeed);

            var threshold = new Threshold(0.6d);

            Sut().Accelerate(threshold);

            _baseMode.Received(1).Accelerate(threshold);
        }
コード例 #2
0
        public void Accelerate(Threshold threshold)
        {
            var currentAngularSpeed = _externalSystems.GetAngularSpeed();

            if (currentAngularSpeed > _cutOffAngularSpeed)
            {
                return;
            }

            _baseMode.Accelerate(threshold);
        }