public void Test_ExpandX_ExpectedOutput() { var limits = new ScottPlot.Config.AxisLimits2D(); limits.ExpandX(-20, 20); Assert.AreEqual(limits.x1, -20); Assert.AreEqual(limits.x2, 20); Assert.IsNaN(limits.y1); Assert.IsNaN(limits.y2); }
public void Test_MakeRational_WhenYsContainNaN() { var limits = new ScottPlot.Config.AxisLimits2D(); limits.ExpandX(-10, 20); limits.MakeRational(); Console.WriteLine(limits); Assert.That(limits.x1 == -10); Assert.That(limits.x2 == 20); Assert.That(limits.y1 < 0); Assert.That(limits.y1 > -10); Assert.That(limits.y2 > 0); Assert.That(limits.y2 < 10); }