public void CalculateAndSetValueTest() { DoubleTweener target; TweeningTestObject obj; float deltaTime; // test absolute tweening target = new DoubleTweener(); obj = new TweeningTestObject { DoubleValue = 10F }; target.Create(obj, new PropertyOps("DoubleValue", 10F, false)); deltaTime = 0F; target.CalculateAndSetValue(deltaTime); Assert.AreEqual(10F, obj.DoubleValue); deltaTime = 0.5F; target.CalculateAndSetValue(deltaTime); Assert.AreEqual(10F, obj.DoubleValue); deltaTime = 1F; target.CalculateAndSetValue(deltaTime); Assert.AreEqual(10F, obj.DoubleValue); // test relative tweening target = new DoubleTweener(); obj = new TweeningTestObject { DoubleValue = 10F }; target.Create(obj, new PropertyOps("DoubleValue", 10F, true)); deltaTime = 0F; target.CalculateAndSetValue(deltaTime); Assert.AreEqual(10F, obj.DoubleValue); deltaTime = 0.5F; target.CalculateAndSetValue(deltaTime); Assert.AreEqual(15F, obj.DoubleValue); deltaTime = 1F; target.CalculateAndSetValue(deltaTime); Assert.AreEqual(20F, obj.DoubleValue); }
public void DoubleTweenerConstructorTest() { DoubleTweener target = new DoubleTweener(); }