コード例 #1
0
        public void GenerateEasingType()
        {
            Assert.AreEqual(EasingType.None, ValueGenerator.GenerateEasingType(EasingMethod.None, true, true));
            Assert.AreEqual(EasingType.EaseInOut, ValueGenerator.GenerateEasingType(EasingMethod.Ease, true, true));
            Assert.AreEqual(EasingType.EaseIn, ValueGenerator.GenerateEasingType(EasingMethod.Ease, true, false));
            Assert.AreEqual(EasingType.EaseOut, ValueGenerator.GenerateEasingType(EasingMethod.Ease, false, true));
            Assert.AreEqual(EasingType.ElasticInOut, ValueGenerator.GenerateEasingType(EasingMethod.Elastic, true, true));
            Assert.AreEqual(EasingType.ElasticIn, ValueGenerator.GenerateEasingType(EasingMethod.Elastic, true, false));
            Assert.AreEqual(EasingType.ElasticOut, ValueGenerator.GenerateEasingType(EasingMethod.Elastic, false, true));
            Assert.AreEqual(EasingType.BounceInOut, ValueGenerator.GenerateEasingType(EasingMethod.Bounce, true, true));
            Assert.AreEqual(EasingType.BounceIn, ValueGenerator.GenerateEasingType(EasingMethod.Bounce, true, false));
            Assert.AreEqual(EasingType.BounceOut, ValueGenerator.GenerateEasingType(EasingMethod.Bounce, false, true));
            Assert.AreEqual(EasingType.ExponentialInOut, ValueGenerator.GenerateEasingType(EasingMethod.Exponential, true, true));
            Assert.AreEqual(EasingType.ExponentialIn, ValueGenerator.GenerateEasingType(EasingMethod.Exponential, true, false));
            Assert.AreEqual(EasingType.ExponentialOut, ValueGenerator.GenerateEasingType(EasingMethod.Exponential, false, true));
            Assert.AreEqual(EasingType.SineInOut, ValueGenerator.GenerateEasingType(EasingMethod.Sine, true, true));
            Assert.AreEqual(EasingType.SineIn, ValueGenerator.GenerateEasingType(EasingMethod.Sine, true, false));
            Assert.AreEqual(EasingType.SineOut, ValueGenerator.GenerateEasingType(EasingMethod.Sine, false, true));
            Assert.AreEqual(EasingType.BackInOut, ValueGenerator.GenerateEasingType(EasingMethod.Back, true, true));
            Assert.AreEqual(EasingType.BackIn, ValueGenerator.GenerateEasingType(EasingMethod.Back, true, false));
            Assert.AreEqual(EasingType.BackOut, ValueGenerator.GenerateEasingType(EasingMethod.Back, false, true));

            Assert.Catch(() => ValueGenerator.GenerateEasingType(EasingMethod.Ease, false, false));
        }