test_class.file: library/src/test/java/com/mapbox/android/gestures/SidewaysShoveGestureDetectorTest.java
test_class.identifier: SidewaysShoveGestureDetectorTest
test_class.superclass: extends
    AbstractGestureDetectorTest<SidewaysShoveGestureDetector,
      SidewaysShoveGestureDetector.OnSidewaysShoveGestureListener>
test_case.body: @Test
    public void analyzeMovementTest() throws Exception {
      when(listener.onSidewaysShoveBegin(gestureDetector)).thenReturn(true);
      when(listener.onSidewaysShove(
        gestureDetector, gestureDetector.deltaPixelSinceLast, gestureDetector.deltaPixelsSinceStart)
      ).thenReturn(true);
      doReturn(true).when(gestureDetector).isAngleAcceptable();
  
      // threshold not met
      doReturn(gestureDetector.getPixelDeltaThreshold() / 2)
        .when(gestureDetector).calculateDeltaPixelsSinceLast();
      gestureDetector.analyzeMovement();
  
      // threshold met, starting
      doReturn(gestureDetector.getPixelDeltaThreshold() * 2)
        .when(gestureDetector).calculateDeltaPixelsSinceLast();
      gestureDetector.analyzeMovement();
  
      // new event, executing onShove()
      gestureDetector.analyzeMovement();
      verify(listener, times(1)).onSidewaysShove(gestureDetector,
        gestureDetector.deltaPixelSinceLast, gestureDetector.deltaPixelsSinceStart);
  
      // new event, executing onShove() even though below threshold because already started
      doReturn(gestureDetector.getPixelDeltaThreshold() / 2)
        .when(gestureDetector).calculateDeltaPixelsSinceLast();
      gestureDetector.analyzeMovement();
      //still 1 invocation because parameters changed, but technically 2
      verify(listener, times(1)).onSidewaysShove(gestureDetector,
        gestureDetector.deltaPixelSinceLast, gestureDetector.deltaPixelsSinceStart);
  
      // angle exceeded don't execute
      doReturn(false)
        .when(gestureDetector).isAngleAcceptable();
      gestureDetector.analyzeMovement();
  
      // angle acceptable again
      doReturn(true)
        .when(gestureDetector).isAngleAcceptable();
      gestureDetector.analyzeMovement();
      // 1 invocation because parameters changed, but technically 3
      verify(listener, times(1)).onSidewaysShove(gestureDetector,
        gestureDetector.deltaPixelSinceLast, gestureDetector.deltaPixelsSinceStart);
  
      // stopping
      gestureDetector.gestureStopped();
  
      // not starting because threshold not met
      gestureDetector.analyzeMovement();
  
      // threshold met again, starting
      doReturn(gestureDetector.getPixelDeltaThreshold() * 2)
        .when(gestureDetector).calculateDeltaPixelsSinceLast();
      gestureDetector.analyzeMovement();
  
      verify(listener, times(2)).onSidewaysShoveBegin(gestureDetector);
      verify(listener, times(1)).onSidewaysShoveEnd(
        gestureDetector, gestureDetector.velocityX, gestureDetector.velocityY);
    }
test_case.class_method_signature: SidewaysShoveGestureDetectorTest.analyzeMovementTest()
test_case.full_signature: @Test public void analyzeMovementTest()
test_case.identifier: analyzeMovementTest
test_case.invocations: thenReturn when onSidewaysShoveBegin thenReturn when onSidewaysShove isAngleAcceptable when doReturn calculateDeltaPixelsSinceLast when doReturn getPixelDeltaThreshold analyzeMovement calculateDeltaPixelsSinceLast when doReturn getPixelDeltaThreshold analyzeMovement analyzeMovement onSidewaysShove verify times calculateDeltaPixelsSinceLast when doReturn getPixelDeltaThreshold analyzeMovement onSidewaysShove verify times isAngleAcceptable when doReturn analyzeMovement isAngleAcceptable when doReturn analyzeMovement onSidewaysShove verify times gestureStopped analyzeMovement calculateDeltaPixelsSinceLast when doReturn getPixelDeltaThreshold analyzeMovement onSidewaysShoveBegin verify times onSidewaysShoveEnd verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void analyzeMovementTest()
focal_class.declarator: handledTypes = new HashSet<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Integer> handledTypes = new HashSet<>();
focal_class.type: Set<Integer>
focal_class.var_name: handledTypes
focal_class.declarator: maxShoveAngle
focal_class.modifier: private
focal_class.original_string: private float maxShoveAngle;
focal_class.type: float
focal_class.var_name: maxShoveAngle
focal_class.declarator: pixelDeltaThreshold
focal_class.modifier: private
focal_class.original_string: private float pixelDeltaThreshold;
focal_class.type: float
focal_class.var_name: pixelDeltaThreshold
focal_class.declarator: deltaPixelsSinceStart
focal_class.original_string: float deltaPixelsSinceStart;
focal_class.type: float
focal_class.var_name: deltaPixelsSinceStart
focal_class.declarator: deltaPixelSinceLast
focal_class.original_string: float deltaPixelSinceLast;
focal_class.type: float
focal_class.var_name: deltaPixelSinceLast
focal_class.file: library/src/main/java/com/mapbox/android/gestures/SidewaysShoveGestureDetector.java
focal_class.identifier: SidewaysShoveGestureDetector
focal_class.class_method_signature: SidewaysShoveGestureDetector.SidewaysShoveGestureDetector(Context context, AndroidGesturesManager gesturesManager)
focal_class.full_signature: public  SidewaysShoveGestureDetector(Context context, AndroidGesturesManager gesturesManager)
focal_class.identifier: SidewaysShoveGestureDetector
focal_class.modifiers: public
focal_class.parameters: (Context context, AndroidGesturesManager gesturesManager)
focal_class.signature:  SidewaysShoveGestureDetector(Context context, AndroidGesturesManager gesturesManager)
focal_class.class_method_signature: SidewaysShoveGestureDetector.provideHandledTypes()
focal_class.full_signature: @NonNull @Override protected Set<Integer> provideHandledTypes()
focal_class.identifier: provideHandledTypes
focal_class.modifiers: @NonNull @Override protected
focal_class.parameters: ()
focal_class.return: Set<Integer>
focal_class.signature: Set<Integer> provideHandledTypes()
focal_class.class_method_signature: SidewaysShoveGestureDetector.analyzeMovement()
focal_class.full_signature: @Override protected boolean analyzeMovement()
focal_class.identifier: analyzeMovement
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean analyzeMovement()
focal_class.class_method_signature: SidewaysShoveGestureDetector.canExecute(int invokedGestureType)
focal_class.full_signature: @Override protected boolean canExecute(int invokedGestureType)
focal_class.identifier: canExecute
focal_class.modifiers: @Override protected
focal_class.parameters: (int invokedGestureType)
focal_class.return: boolean
focal_class.signature: boolean canExecute(int invokedGestureType)
focal_class.class_method_signature: SidewaysShoveGestureDetector.isSloppyGesture()
focal_class.full_signature: @Override protected boolean isSloppyGesture()
focal_class.identifier: isSloppyGesture
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isSloppyGesture()
focal_class.class_method_signature: SidewaysShoveGestureDetector.gestureStopped()
focal_class.full_signature: @Override protected void gestureStopped()
focal_class.identifier: gestureStopped
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void gestureStopped()
focal_class.class_method_signature: SidewaysShoveGestureDetector.reset()
focal_class.full_signature: @Override protected void reset()
focal_class.identifier: reset
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: SidewaysShoveGestureDetector.isAngleAcceptable()
focal_class.full_signature:  boolean isAngleAcceptable()
focal_class.identifier: isAngleAcceptable
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAngleAcceptable()
focal_class.class_method_signature: SidewaysShoveGestureDetector.calculateDeltaPixelsSinceLast()
focal_class.full_signature:  float calculateDeltaPixelsSinceLast()
focal_class.identifier: calculateDeltaPixelsSinceLast
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float calculateDeltaPixelsSinceLast()
focal_class.class_method_signature: SidewaysShoveGestureDetector.getDeltaPixelsSinceStart()
focal_class.full_signature: public float getDeltaPixelsSinceStart()
focal_class.identifier: getDeltaPixelsSinceStart
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getDeltaPixelsSinceStart()
focal_class.class_method_signature: SidewaysShoveGestureDetector.getDeltaPixelSinceLast()
focal_class.full_signature: public float getDeltaPixelSinceLast()
focal_class.identifier: getDeltaPixelSinceLast
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getDeltaPixelSinceLast()
focal_class.class_method_signature: SidewaysShoveGestureDetector.getPixelDeltaThreshold()
focal_class.full_signature: public float getPixelDeltaThreshold()
focal_class.identifier: getPixelDeltaThreshold
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getPixelDeltaThreshold()
focal_class.class_method_signature: SidewaysShoveGestureDetector.setPixelDeltaThreshold(float pixelDeltaThreshold)
focal_class.full_signature: public void setPixelDeltaThreshold(float pixelDeltaThreshold)
focal_class.identifier: setPixelDeltaThreshold
focal_class.modifiers: public
focal_class.parameters: (float pixelDeltaThreshold)
focal_class.return: void
focal_class.signature: void setPixelDeltaThreshold(float pixelDeltaThreshold)
focal_class.class_method_signature: SidewaysShoveGestureDetector.setPixelDeltaThresholdResource(@DimenRes int pixelDeltaThresholdDimen)
focal_class.full_signature: public void setPixelDeltaThresholdResource(@DimenRes int pixelDeltaThresholdDimen)
focal_class.identifier: setPixelDeltaThresholdResource
focal_class.modifiers: public
focal_class.parameters: (@DimenRes int pixelDeltaThresholdDimen)
focal_class.return: void
focal_class.signature: void setPixelDeltaThresholdResource(@DimenRes int pixelDeltaThresholdDimen)
focal_class.class_method_signature: SidewaysShoveGestureDetector.getMaxShoveAngle()
focal_class.full_signature: public float getMaxShoveAngle()
focal_class.identifier: getMaxShoveAngle
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getMaxShoveAngle()
focal_class.class_method_signature: SidewaysShoveGestureDetector.setMaxShoveAngle(float maxShoveAngle)
focal_class.full_signature: public void setMaxShoveAngle(float maxShoveAngle)
focal_class.identifier: setMaxShoveAngle
focal_class.modifiers: public
focal_class.parameters: (float maxShoveAngle)
focal_class.return: void
focal_class.signature: void setMaxShoveAngle(float maxShoveAngle)
focal_class.superclass: extends
    ProgressiveGesture<SidewaysShoveGestureDetector.OnSidewaysShoveGestureListener>
focal_method.body: @Override
    protected boolean analyzeMovement() {
      super.analyzeMovement();
  
      deltaPixelSinceLast = calculateDeltaPixelsSinceLast();
      deltaPixelsSinceStart += deltaPixelSinceLast;
  
      if (isInProgress() && deltaPixelSinceLast != 0) {
        return listener.onSidewaysShove(this, deltaPixelSinceLast, deltaPixelsSinceStart);
      } else if (canExecute(GESTURE_TYPE_SIDEWAYS_SHOVE)) {
        if (listener.onSidewaysShoveBegin(this)) {
          gestureStarted();
          return true;
        }
      }
  
      return false;
    }
focal_method.class_method_signature: SidewaysShoveGestureDetector.analyzeMovement()
focal_method.full_signature: @Override protected boolean analyzeMovement()
focal_method.identifier: analyzeMovement
focal_method.invocations: analyzeMovement calculateDeltaPixelsSinceLast isInProgress onSidewaysShove canExecute onSidewaysShoveBegin gestureStarted
focal_method.modifiers: @Override protected
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean analyzeMovement()