Exemplo n.º 1
0
        public void TimePeriodConstructorWithDelayMilliSeconds()
        {
            tlog.Debug(tag, $"TimePeriodConstructorWithDelayMilliSeconds START");

            var testingTarget = new TimePeriod(0.3f, 1.0f);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TimePeriod>(testingTarget, "Should be an Instance of TimePeriod!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TimePeriodConstructorWithDelayMilliSeconds END (OK)");
        }
Exemplo n.º 2
0
        public void TimePeriodConstructor()
        {
            tlog.Debug(tag, $"TimePeriodConstructor START");

            var testingTarget = new TimePeriod(300);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TimePeriod>(testingTarget, "Should be an Instance of TimePeriod!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TimePeriodConstructor END (OK)");
        }
Exemplo n.º 3
0
        public void TimePeriodConstructorWithFloats()
        {
            tlog.Debug(tag, $"TimePeriodConstructorWithFloats START");

            var testingTarget = new TimePeriod(0, 300);

            Assert.IsNotNull(testingTarget, "Can't create success object TimePeriod");
            Assert.IsInstanceOf <TimePeriod>(testingTarget, "Should return TimePeriod instance.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TimePeriodConstructorWithFloats END (OK)");
        }
Exemplo n.º 4
0
        public void TimePeriodConstructorDurationMilliseconds()
        {
            tlog.Debug(tag, $"TimePeriodConstructorDurationMilliseconds START");

            var testingTarget = new TimePeriod(0.3f, 1.0f);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TimePeriod>(testingTarget, "Should be an Instance of TimePeriod!");

            testingTarget.DurationMilliseconds = 150;
            Assert.AreEqual(150, testingTarget.DurationMilliseconds, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TimePeriodConstructorDurationMilliseconds END (OK)");
        }
Exemplo n.º 5
0
        public void TimePeriodDelayMilliseconds()
        {
            tlog.Debug(tag, $"TimePeriodDelayMilliseconds START");

            var testingTarget = new TimePeriod(0, 300);

            Assert.IsNotNull(testingTarget, "Can't create success object TimePeriod");
            Assert.IsInstanceOf <TimePeriod>(testingTarget, "Should return TimePeriod instance.");

            testingTarget.DelayMilliseconds = 20;
            Assert.AreEqual(20, testingTarget.DelayMilliseconds, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TimePeriodDelayMilliseconds END (OK)");
        }
Exemplo n.º 6
0
        public void TransitionItemShowSourceAfterFinished()
        {
            tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished START");

            View currentView = new View()
            {
                Name = "currentPage",
                TransitionOptions = new TransitionOptions(Window.Instance)
            };

            currentView.TransitionOptions.TransitionTag    = "Transition";
            currentView.TransitionOptions.EnableTransition = true;

            View newView = new View()
            {
                Name = "newPage",
                TransitionOptions = new TransitionOptions(Window.Instance)
            };

            newView.TransitionOptions.TransitionTag    = "Transition";
            newView.TransitionOptions.EnableTransition = true;

            AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
            TimePeriod    timePeriod    = new TimePeriod(500);

            var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");

            try
            {
                testingTarget.ShowSourceAfterFinished = true;
            }
            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());
            }

            newView.Dispose();
            currentView.Dispose();
            timePeriod.Dispose();
            alphaFunction.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished END (OK)");
        }
Exemplo n.º 7
0
        public void TransitionItemAssign()
        {
            tlog.Debug(tag, $"TransitionItemAssign START");

            View currentView = new View()
            {
                Name = "currentPage",
                TransitionOptions = new TransitionOptions(Window.Instance)
            };

            currentView.TransitionOptions.TransitionTag    = "Transition";
            currentView.TransitionOptions.EnableTransition = true;

            View newView = new View()
            {
                Name = "newPage",
                TransitionOptions = new TransitionOptions(Window.Instance)
            };

            newView.TransitionOptions.TransitionTag    = "Transition";
            newView.TransitionOptions.EnableTransition = true;

            AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
            TimePeriod    timePeriod    = new TimePeriod(500);

            var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");

            using (TransitionItem rhs = new TransitionItem(testingTarget))
            {
                var result = testingTarget.Assign(rhs);
                Assert.IsNotNull(result, "Should be not null!");
                Assert.IsInstanceOf <TransitionItem>(result, "Should be an Instance of TransitionItem!");
            }

            currentView?.Dispose();
            newView?.Dispose();
            timePeriod?.Dispose();
            alphaFunction?.Dispose();
            testingTarget?.Dispose();
            tlog.Debug(tag, $"TransitionItemAssign END (OK)");
        }