Assert.assertTrue(newXStop < xStop);
}
@Test
public void TestZoomingActionsTimeY() {
XYAxis xAxis = plotTimeOnY.getPlotView().getXAxis();
XYAxis yAxis = plotTimeOnY.getPlotView().getYAxis();
double xStart = xAxis.getStart();
double xStop = xAxis.getEnd();
double yStart = yAxis.getStart();
double yStop = yAxis.getEnd();
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_HIGH_Y_AXIS);
double newXStart = xAxis.getStart();
double newXStop = xAxis.getEnd();
double newYStart = yAxis.getStart();
double newYStop = yAxis.getEnd();
Assert.assertEquals(newYStart, yStart);
Assert.assertTrue(newYStop < yStop);
Assert.assertEquals(newXStart, xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_HIGH_Y_AXIS);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_HIGH_Y_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertEquals(newYStart, yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertEquals(newXStart, xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_CENTER_Y_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart > yStart);
Assert.assertTrue(newYStop < yStop);
Assert.assertEquals(newXStart, xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_CENTER_Y_AXIS);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_CENTER_Y_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertEquals(newXStart, xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_LOW_Y_AXIS);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_LOW_Y_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart > yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertEquals(newXStart, xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_LOW_Y_AXIS);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_LOW_Y_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertEquals(newXStart, xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_LEFT_X_AXIS);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_LEFT_X_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertTrue(newXStart > xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_LEFT_X_AXIS);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_LEFT_X_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertTrue(newXStart > xStart);
Assert.assertEquals(newXStop, xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_CENTER_X_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newXStart > xStart);
Assert.assertTrue(newXStop < xStop);
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_CENTER_X_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertTrue(newXStart > xStart);
Assert.assertTrue(newXStop < xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_IN_RIGHT_X_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertTrue(newXStart > xStart);
Assert.assertTrue(newXStop < xStop);
panAndZoomManagerTimeOnY.zoomAction(ZoomDirection.ZOOM_OUT_RIGHT_X_AXIS);
newXStart = xAxis.getStart();
newXStop = xAxis.getEnd();
newYStart = yAxis.getStart();
newYStop = yAxis.getEnd();
Assert.assertTrue(newYStart < yStart);
Assert.assertTrue(newYStop > yStop);
Assert.assertTrue(newXStart > xStart);
Assert.assertTrue(newXStop < xStop);