public void TestExecuteShouldZoomToFullExtentIfViewIsSquare() { var squareViewExtent = new Rect(0d, 0d, 1d, 1d); _scatterPlot.SetViewExtent(squareViewExtent); _handler.Execute(new ZoomToFullExtentCommand()); var viewExtent = _scatterPlot.GetViewExtent(); Assert.That(viewExtent.X, Is.EqualTo(-0.1d).Within(Tolerance)); Assert.That(viewExtent.Y, Is.EqualTo(-0.1d).Within(Tolerance)); Assert.That(viewExtent.Width, Is.EqualTo(1.2d).Within(Tolerance)); Assert.That(viewExtent.Height, Is.EqualTo(1.2d).Within(Tolerance)); }
public void TestGetSetViewExtentShouldGetSetViewExtent() { var viewExtent = new Rect(); _scatterPlot.SetViewExtent(viewExtent); var result = _scatterPlot.GetViewExtent(); Assert.That(result, Is.EqualTo(viewExtent)); }