Esempio n. 1
0
        public void TextLabelStrikethrough()
        {
            tlog.Debug(tag, $"TextLabelStrikethrough START");

            var testingTarget = new TextLabel(true);

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

            var setStrikethrough = new Tizen.NUI.Text.Strikethrough()
            {
                Enable = true,
                Color  = new Color("#3498DB"),
                Height = 2.0f
            };

            testingTarget.SetStrikethrough(setStrikethrough);

            var getStrikethrough = testingTarget.GetStrikethrough();

            Assert.AreEqual(getStrikethrough.Enable, setStrikethrough.Enable, "Should be equal!");
            Assert.AreEqual(true, CheckColor(getStrikethrough.Color, setStrikethrough.Color), "Should be true!");
            Assert.AreEqual(getStrikethrough.Height, setStrikethrough.Height, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TextLabelStrikethrough END (OK)");
        }
Esempio n. 2
0
        public void StrikethroughEquals()
        {
            tlog.Debug(tag, $"StrikethroughEquals START");

            var strikethrough = new Tizen.NUI.Text.Strikethrough();

            Assert.IsNotNull(strikethrough, "Can't create success object strikethrough");
            Assert.IsInstanceOf <Tizen.NUI.Text.Strikethrough>(strikethrough, "Should be an instance of strikethrough type.");

            var compare = new Tizen.NUI.Text.Strikethrough();

            Assert.IsTrue(strikethrough == compare, "Should be true!");
            Assert.AreEqual(strikethrough.GetHashCode(), compare.GetHashCode(), "Should be true!");

            compare.Height = 2.0f;
            Assert.IsTrue(strikethrough != compare, "Should be true!");

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