@Test public void testAnimate() { CoachmarkViewLayout layoutMock = Mockito.mock(CoachmarkViewLayout.class); AnimationListener animationListenerMock = Mockito.mock(AnimationListener.class); CircleView circleViewMock = Mockito.mock(CircleView.class); RectF rectFMock = Mockito.mock(RectF.class); when(rectFMock.width()).thenReturn(10f); when(rectFMock.centerX()).thenReturn(3f); when(rectFMock.centerY()).thenReturn(3f); when(layoutMock.calcCircleRectF()).thenReturn(rectFMock); new NoAnimationRenderer().animate(layoutMock, circleViewMock, animationListenerMock); verify(layoutMock, times(1)).calcCircleRectF(); verify(circleViewMock).setRadius(5f); verify(circleViewMock).setCenterX(3f); verify(circleViewMock).setCenterY(3f); verify(animationListenerMock, times(1)).onAnimationFinished(); }
@Override public void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener) { RectF mCircleRectF = layout.calcCircleRectF(); view.setRadius(mCircleRectF.width() / 2); view.setCenterX(mCircleRectF.centerX()); view.setCenterY(mCircleRectF.centerY()); animationListener.onAnimationFinished(); }
NoAnimationRenderer implements AnimationRenderer { @Override public void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener) { RectF mCircleRectF = layout.calcCircleRectF(); view.setRadius(mCircleRectF.width() / 2); view.setCenterX(mCircleRectF.centerX()); view.setCenterY(mCircleRectF.centerY()); animationListener.onAnimationFinished(); } }
NoAnimationRenderer implements AnimationRenderer { @Override public void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener) { RectF mCircleRectF = layout.calcCircleRectF(); view.setRadius(mCircleRectF.width() / 2); view.setCenterX(mCircleRectF.centerX()); view.setCenterY(mCircleRectF.centerY()); animationListener.onAnimationFinished(); }  }
NoAnimationRenderer implements AnimationRenderer { @Override public void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener) { RectF mCircleRectF = layout.calcCircleRectF(); view.setRadius(mCircleRectF.width() / 2); view.setCenterX(mCircleRectF.centerX()); view.setCenterY(mCircleRectF.centerY()); animationListener.onAnimationFinished(); }  @Override void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener); }
NoAnimationRenderer implements AnimationRenderer { @Override public void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener) { RectF mCircleRectF = layout.calcCircleRectF(); view.setRadius(mCircleRectF.width() / 2); view.setCenterX(mCircleRectF.centerX()); view.setCenterY(mCircleRectF.centerY()); animationListener.onAnimationFinished(); }  @Override void animate(final CoachmarkViewLayout layout, final CircleView view, final AnimationListener animationListener);  }