Beispiel #1
0
        public void Increment(string initialValue, double increment, int direction, string expectedValue)
        {
            MeasurmentControlController controller = new MeasurmentControlController
            {
                Increment = increment,
                Culture   = CultureInfo.InvariantCulture
            };

            controller.DoIncrement(initialValue, direction).Should().Be(expectedValue);
        }
Beispiel #2
0
        public void TestMinimum(double minimum, double increment)
        {
            MeasurmentControlController controller = new MeasurmentControlController
            {
                Culture   = CultureInfo.InvariantCulture,
                Minimum   = minimum,
                Increment = increment,
            };

            var s = controller.FormatNumericPart(minimum);

            controller.DoIncrement(s, -1).Should().Be(s);
        }