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

            using (ItemFactory factory = new ItemFactory())
            {
                var testingTarget = new ItemView(factory);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ItemView>(testingTarget, "Should be an Instance of ItemView!");

                View view = new View()
                {
                    Size = new Size(100, 80)
                };

                testingTarget.AddLayout(new ItemLayout(view.SwigCPtr.Handle, true));

                try
                {
                    var result = testingTarget.GetItemId(view);
                    tlog.Debug(tag, "ItemId : " + result);
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception : Failed!");
                }
            }

            tlog.Debug(tag, $"ItemViewGetItemId END (OK)");
        }
Example #2
0
        public void ItemViewRemoveLayout()
        {
            tlog.Debug(tag, $"ItemViewRemoveLayout START");

            using (ItemFactory factory = new ItemFactory())
            {
                var testingTarget = new ItemView(factory);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ItemView>(testingTarget, "Should be an Instance of ItemView!");

                testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
                tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());

                try
                {
                    testingTarget.RemoveLayout((uint)testingTarget.LayoutPosition);
                    tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed!");
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ItemViewRemoveLayout END (OK)");
        }
Example #3
0
        public void ItemViewRefresh()
        {
            tlog.Debug(tag, $"ItemViewRefresh START");

            using (ItemFactory factory = new ItemFactory())
            {
                var testingTarget = new ItemView(factory);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ItemView>(testingTarget, "Should be an Instance of ItemView!");

                testingTarget.AddLayout(new ItemLayout(factory.SwigCPtr.Handle, true));

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

            tlog.Debug(tag, $"ItemViewRefresh END (OK)");
        }
Example #4
0
        public void ItemViewAddLayout()
        {
            tlog.Debug(tag, $"ItemViewAddLayout START");

            using (ItemFactory factory = new ItemFactory())
            {
                var testingTarget = new ItemView(factory);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ItemView>(testingTarget, "Should be an Instance of ItemView!");

                testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ItemViewAddLayout END (OK)");
        }