test_class.declarator: xyPlot
test_class.modifier: @Mock
test_class.original_string: @Mock
      XYPlot xyPlot;
test_class.type: XYPlot
test_class.var_name: xyPlot
test_class.file: androidplot-core/src/test/java/com/androidplot/xy/ZoomEstimatorTest.java
test_class.identifier: ZoomEstimatorTest
test_class.superclass: extends AndroidplotTest
test_case.body: @Test
      public void testCheck() throws Exception {
          ZoomEstimator estimator = spy(new ZoomEstimator());
  
          SampledXYSeries series =
                  spy(new SampledXYSeries(TestUtils
                          .generateXYSeries("test series", 1000), 2, 100));
          series.resample();
          assertEquals(8d, series.getMaxZoomFactor());
  
          XYSeriesBundle bundle = new XYSeriesBundle(series, null);
  
          when(xyPlot.getBounds())
                  .thenReturn(new RectRegion(0, 1000, 0, 1000))
                  .thenReturn(new RectRegion(0, 500, 0, 500))
                  .thenReturn(new RectRegion(0, 1, 0, 1));
  
          estimator.run(xyPlot, bundle);
          estimator.run(xyPlot, bundle);
          estimator.run(xyPlot, bundle);
  
          verify(series).setZoomFactor(8);
          verify(series).setZoomFactor(4);
          verify(series).setZoomFactor(1);
      }
test_case.class_method_signature: ZoomEstimatorTest.testCheck()
test_case.full_signature: @Test public void testCheck()
test_case.identifier: testCheck
test_case.invocations: spy spy generateXYSeries resample assertEquals getMaxZoomFactor thenReturn thenReturn thenReturn when getBounds run run run setZoomFactor verify setZoomFactor verify setZoomFactor verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCheck()
focal_class.file: androidplot-core/src/main/java/com/androidplot/xy/ZoomEstimator.java
focal_class.identifier: ZoomEstimator
focal_class.class_method_signature: ZoomEstimator.run(XYPlot plot, XYSeriesBundle sf)
focal_class.full_signature: @Override public void run(XYPlot plot, XYSeriesBundle sf)
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: (XYPlot plot, XYSeriesBundle sf)
focal_class.return: void
focal_class.signature: void run(XYPlot plot, XYSeriesBundle sf)
focal_class.class_method_signature: ZoomEstimator.calculateZoom(SampledXYSeries series, RectRegion visibleBounds)
focal_class.full_signature: protected double calculateZoom(SampledXYSeries series, RectRegion visibleBounds)
focal_class.identifier: calculateZoom
focal_class.modifiers: protected
focal_class.parameters: (SampledXYSeries series, RectRegion visibleBounds)
focal_class.return: double
focal_class.signature: double calculateZoom(SampledXYSeries series, RectRegion visibleBounds)
focal_class.superclass: extends Estimator
focal_method.body: @Override
      public void run(XYPlot plot, XYSeriesBundle sf) {
          if(sf.getSeries() instanceof SampledXYSeries) {
              SampledXYSeries oxy = (SampledXYSeries) sf.getSeries();
              final double factor = calculateZoom(oxy, plot.getBounds());
              oxy.setZoomFactor(factor);
          }
      }
focal_method.class_method_signature: ZoomEstimator.run(XYPlot plot, XYSeriesBundle sf)
focal_method.full_signature: @Override public void run(XYPlot plot, XYSeriesBundle sf)
focal_method.identifier: run
focal_method.invocations: getSeries getSeries calculateZoom getBounds setZoomFactor
focal_method.modifiers: @Override public
focal_method.parameters: (XYPlot plot, XYSeriesBundle sf)
focal_method.return: void
focal_method.signature: void run(XYPlot plot, XYSeriesBundle sf)