Пример #1
0
  @Test
  public void removesAnimationTargetOnCleanup(@Mocked Effect mockedBase) {
    Rotate rotate = new Rotate(10, 200, 100);

    rotate.init(animator, null);
    rotate.cleanup(animator);

    new Verifications() {
      {
        animator.removeTarget((TimingTarget) withNotNull());
      }
    };
  }
Пример #2
0
  @Test
  public void addsAnimationTargetOnInit(
      @Injectable ComponentState start, @Injectable ComponentState end) {
    Rotate rotate = new Rotate(start, end, 45, 100, 60);

    rotate.init(animator, null);

    new Verifications() {
      {
        animator.addTarget((TimingTarget) withNotNull());
      }
    };
  }
Пример #3
0
  @Test
  public void rotatesComponentByCurrentAngleOnSetup(@Injectable final Graphics2D g2D) {
    new EffectSetupVerification(g2D);
    Rotate rotate = new Rotate(90, new JButton());
    rotate.setRadians(0.2);

    rotate.setup(g2D);

    new Verifications() {
      {
        g2D.rotate(0.2);
      }
    };
  }