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

            var testingTarget = new LayoutController(Window.Instance);

            Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
            Assert.IsInstanceOf <LayoutController>(testingTarget, "Should be an instance of LayoutController type.");

            using (LayoutGroup group = new LayoutGroup())
            {
                using (LayoutItem layoutItem = new LayoutItem())
                {
                    group.Add(layoutItem);
                    try
                    {
                        testingTarget.RequestLayout(layoutItem);
                    }
                    catch (Exception e)
                    {
                        tlog.Debug(tag, e.Message.ToString());
                        Assert.Fail("Caught Exception : Failed!");
                    }
                }
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"LayoutControllerRequestLayoutParentNotNUll END (OK)");
        }
Example #2
0
        public void LayoutControllerGetId()
        {
            tlog.Debug(tag, $"LayoutControllerGetId START");

            var testingTarget = new LayoutController(Window.Instance);

            Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
            Assert.IsInstanceOf <LayoutController>(testingTarget, "Should be an instance of LayoutController type.");

            tlog.Debug(tag, testingTarget.GetId().ToString());

            testingTarget.Dispose();
            // disposed
            testingTarget.Dispose();
            tlog.Debug(tag, $"LayoutControllerGetId END (OK)");
        }
Example #3
0
        public void LayoutControllerRequestLayout()
        {
            tlog.Debug(tag, $"LayoutControllerRequestLayout START");

            var testingTarget = new LayoutController(Window.Instance);

            Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
            Assert.IsInstanceOf <LayoutController>(testingTarget, "Should be an instance of LayoutController type.");

            using (LayoutItem layoutItem = new LayoutItem())
            {
                using (View view = new View())
                {
                    view.Name = "parentView";
                    layoutItem.AttachToOwner(view);

                    try
                    {
                        testingTarget.RequestLayout(layoutItem);
                    }
                    catch (Exception e)
                    {
                        tlog.Debug(tag, e.Message.ToString());
                        Assert.Fail("Caught Exception : Failed!");
                    }
                }
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"LayoutControllerRequestLayout END (OK)");
        }
Example #4
0
        public void LayoutControllerGetCoreAnimation()
        {
            tlog.Debug(tag, $"LayoutControllerGetCoreAnimation START");

            var testingTarget = new LayoutController(Window.Instance);

            Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
            Assert.IsInstanceOf <LayoutController>(testingTarget, "Should be an instance of LayoutController type.");

            var result = testingTarget.GetCoreAnimation();

            tlog.Debug(tag, "Get core animation : " + result);

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