public void PlotDerivativeWithDx0()
        {
            // Arrange
            var plotter = new SchemeCalculator(evaluator);

            // Act
            var actual = plotter.PlotDerivative("(lambda (x) (* x x))", 0, 1, 3, 3);

            // Assert
            Assert.AreEqual(actual, null);
        }
        public void PlotDerivative1To33Samples()
        {
            // Arrange
            double dx = 0.001;
            var plotter = new SchemeCalculator(evaluator);
            var expected = new List<KeyValuePair<double, double>>
            {
                new KeyValuePair<double, double>(1, 2),
                new KeyValuePair<double, double>(2, 4),
                new KeyValuePair<double, double>(3, 6),
            };

            // Act
            var actual = plotter.PlotDerivative("(lambda (x) (* x x))", dx, 1, 3, 3);

            // Assert
            for (int i = 0; i < 3; i++)
            {
                var expectedI = expected[i];
                var actualI = actual.ElementAt(i);
                Assert.That(actualI.Value, Is.EqualTo(expectedI.Value).Within(dx));
                Assert.AreEqual(expectedI.Key, actualI.Key);
            }
        }