@Test public void autoFinishes() { StubAnimation a = new StubAnimation(l); a.run(100); assertThat(l.progresses, contains(0.0, 1.0)); }
@Override public void run(final int duration) { requestedDuration = duration; currentProgress = 0; if (autoFinish) { tick(0); tick(1); } }
StubAnimation implements IsAnimation { @Override public void run(final int duration) { requestedDuration = duration; currentProgress = 0; if (autoFinish) { tick(0); tick(1); } } }
StubAnimation implements IsAnimation { @Override public void run(final int duration) { requestedDuration = duration; currentProgress = 0; if (autoFinish) { tick(0); tick(1); } } StubAnimation(AnimationLogic logic); }
StubAnimation implements IsAnimation { @Override public void run(final int duration) { requestedDuration = duration; currentProgress = 0; if (autoFinish) { tick(0); tick(1); } } StubAnimation(AnimationLogic logic); void tick(final double progress); @Override void doNotAutoFinish(); @Override void run(final int duration); int getRequestedDuration(); void setRequestedDuration(int requestedDuration); @Override void cancel(); @Override void setNewLogic(AnimationLogic logic); boolean isRunning(); boolean isCancelled(); boolean isFinished(); }
StubAnimation implements IsAnimation { @Override public void run(final int duration) { requestedDuration = duration; currentProgress = 0; if (autoFinish) { tick(0); tick(1); } } StubAnimation(AnimationLogic logic); void tick(final double progress); @Override void doNotAutoFinish(); @Override void run(final int duration); int getRequestedDuration(); void setRequestedDuration(int requestedDuration); @Override void cancel(); @Override void setNewLogic(AnimationLogic logic); boolean isRunning(); boolean isCancelled(); boolean isFinished();  }