private Vector2d pos1 = new Vector2d(100,100);
private Vector2d pos2 = new Vector2d(111,111);
public void testAnimatingPosition() {
final Circle e = Kinetic.createCircle(pos1, 10);
final Animation animation = Kinetic.createAnimation(layer, new Drawable() {
@Override
public void draw(Frame frame) {
e.setPosition(pos2);
assertEquals("Position cannot be set", pos2, e.getPosition());
}
});
assertEquals("Position cannot be set", pos1, e.getPosition());
animation.start();
layer.draw();
animation.stop();
assertEquals("Animated position does not match", pos2, e.getPosition());
}