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

            DefaultLinearItemStyle style = new DefaultLinearItemStyle()
            {
                Label = new TextLabelStyle()
                {
                    EnableAutoScroll = true,
                    Ellipsis         = true,
                },
                Icon = new ViewStyle()
                {
                    Color = new ColorSelector
                    {
                        Normal = Color.Cyan,
                    },
                }
            };

            var testingTarget = new DefaultLinearItemStyle(style);

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <DefaultLinearItemStyle>(testingTarget, "Should return DefaultLinearItemStyle instance.");

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

            var style = new DefaultLinearItemStyle()
            {
                SizeHeight = 108,
                Padding    = new Extents(64, 64, 18, 17),
                Margin     = new Extents(0, 0, 0, 0),
                Icon       = new ViewStyle()
                {
                    Margin = new Extents(0, 32, 0, 0)
                },
            };
            var testingTarget = new DefaultLinearItem(style);

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

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

            DefaultLinearItemStyle style = new DefaultLinearItemStyle()
            {
                Label = new TextLabelStyle()
                {
                    EnableAutoScroll = true,
                    Ellipsis         = true,
                },
                Icon = new ViewStyle()
                {
                    Color = new ColorSelector
                    {
                        Normal = Color.Cyan,
                    },
                }
            };

            var testingTarget = new DefaultLinearItemStyle();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <DefaultLinearItemStyle>(testingTarget, "Should return DefaultLinearItemStyle instance.");

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

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