[InlineData(true, true, 6560, 2560)] // 56.0% of the way from 2000 to 3000 public void CanTweenKeyframes(bool addZeroFrame, bool addLoop, int time, int expected) { var anim = new TestAnimation() .AddKeyframe(TimeSpan.FromMilliseconds(1000), 1000) .AddKeyframe(TimeSpan.FromMilliseconds(2000), 2000) .AddKeyframe(TimeSpan.FromMilliseconds(3000), 3000); if (addZeroFrame) { anim.AddKeyframe(TimeSpan.Zero, 0); } if (addLoop) { anim.Loop(TimeSpan.FromMilliseconds(1000)); } var frame = anim.GetFrame(TimeSpan.FromMilliseconds(time)); Assert.Equal(expected, frame); }