Exemplo n.º 1
0
        public void Test_ExpandY_ExpectedOutput()
        {
            var limits = new ScottPlot.Config.AxisLimits2D();

            limits.ExpandY(-20, 20);

            Assert.IsNaN(limits.x1);
            Assert.IsNaN(limits.x2);
            Assert.AreEqual(limits.y1, -20);
            Assert.AreEqual(limits.y2, 20);
        }
Exemplo n.º 2
0
        public void Test_MakeRational_WhenXsContainNaN()
        {
            var limits = new ScottPlot.Config.AxisLimits2D();

            limits.ExpandY(-30, 40);
            limits.MakeRational();

            Console.WriteLine(limits);

            Assert.That(limits.x1 < 0);
            Assert.That(limits.x1 > -10);

            Assert.That(limits.x2 > 0);
            Assert.That(limits.x2 < 10);

            Assert.That(limits.y1 == -30);
            Assert.That(limits.y2 == 40);
        }