Beispiel #1
0
        public void CalculateDemeritPoints_SpeedIsOutOfRange_ThrowArgumentOutOfRangeException()
        {
            var calculator = new DemeritPointsCalculator();

            Assert.That(() => calculator.CalculateDemeritPoints(-1),
                        Throws.Exception.TypeOf <ArgumentOutOfRangeException>());
        }
Beispiel #2
0
        public void CalculateDemeritPoints_WhenCalled_ReturnDemeritPoints(int speed)
        {
            var calculator = new DemeritPointsCalculator();

            var points = calculator.CalculateDemeritPoints(speed);

            Assert.That(points, Is.EqualTo(expectedResult));
        }