Beispiel #1
0
        public void KeyFramesAddWithObjectAndAlphaFunc()
        {
            tlog.Debug(tag, $"KeyFramesAddWithObjectAndAlphaFunc START");

            var testingTarget = new KeyFrames();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");

            Position      pos    = new Position(10.0f, 20.0f, 30.0f);
            AlphaFunction linear = new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear);

            try
            {
                testingTarget.Add(0.3f, pos, linear);
                Assert.IsTrue("Vector3" == testingTarget.GetType().ToString());
            }
            catch (Exception e)
            {
                tlog.Error(tag, "Caught Exception" + e.ToString());
                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }

            pos.Dispose();
            linear.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"KeyFramesAddWithObjectAndAlphaFunc END (OK)");
        }
Beispiel #2
0
        public void KeyFramesAddWithPropertyValueAndAlphaFunc()
        {
            tlog.Debug(tag, $"KeyFramesAddWithPropertyValueAndAlphaFunc START");

            var testingTarget = new KeyFrames();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");

            PropertyValue dummy = new PropertyValue(true);
            AlphaFunction ease  = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);

            try
            {
                testingTarget.Add(0.3f, dummy, ease);
                Assert.IsTrue("Boolean" == testingTarget.GetType().ToString());
            }
            catch (Exception e)
            {
                tlog.Error(tag, "Caught Exception" + e.ToString());
                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }

            dummy.Dispose();
            ease.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"KeyFramesAddWithPropertyValueAndAlphaFunc END (OK)");
        }
Beispiel #3
0
        public void KeyFramesAddWithObject()
        {
            tlog.Debug(tag, $"KeyFramesAddWithObject START");

            var testingTarget = new KeyFrames();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");

            Position pos = new Position(10.0f, 20.0f, 30.0f);

            testingTarget.Add(0.3f, pos);

            var result = testingTarget.GetType().ToString();

            Assert.IsTrue("Vector3" == result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"KeyFramesAddWithObject END (OK)");
        }
Beispiel #4
0
        public void KeyFramesGetType()
        {
            tlog.Debug(tag, $"KeyFramesGetType START");

            var testingTarget = new KeyFrames();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");

            Color color = Color.Yellow;

            testingTarget.Add(0.3f, color);

            var result = testingTarget.GetType().ToString();

            Assert.IsTrue("Vector4" == result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"KeyFramesGetType END (OK)");
        }
Beispiel #5
0
        public void KeyFramesAddWithPropertyValue()
        {
            tlog.Debug(tag, $"KeyFramesAddWithPropertyValue START");

            var testingTarget = new KeyFrames();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");

            PropertyValue dummy = new PropertyValue(true);

            testingTarget.Add(0.3f, dummy);

            var result = testingTarget.GetType().ToString();

            Assert.IsTrue("Boolean" == result);

            dummy.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"KeyFramesAddWithPropertyValue END (OK)");
        }