public void FinishShouldCallUpdateWithFinalValue() { double?returnedValue = null; var tween = new TweenAnimateDouble(TimeSpan.FromTicks(100), 100, 200, x => returnedValue = x); tween.Finish(); Assert.NotNull(returnedValue); Assert.Equal(200, returnedValue.Value); }
public void UpdateCallbackShouldHaveProperValuePassedToItWithEasing(int ticksToAdvance, double expectedValue) { double?returnedValue = null; var tween = new TweenAnimateDouble(TimeSpan.FromTicks(100), 100, 200, x => returnedValue = x, x => x * x); tween.Advance(TimeSpan.FromTicks(ticksToAdvance)); Assert.NotNull(returnedValue); Assert.Equal(expectedValue, returnedValue.Value, 4); }