Пример #1
0
        public void TextMapHelperGetHiddenInputMap()
        {
            tlog.Debug(tag, $"TextMapHelperGetHiddenInputMap START");

            var hiddenInput = new Tizen.NUI.Text.HiddenInput()
            {
                Mode = HiddenInputModeType.ShowLastCharacter,
                SubstituteCharacter       = '★',
                SubstituteCount           = 0,
                ShowLastCharacterDuration = 1000
            };

            var map = TextMapHelper.GetHiddenInputMap(hiddenInput);

            map.Find(0).Get(out int mode);
            map.Find(1).Get(out int substituteCharacter);
            map.Find(2).Get(out int substituteCount);
            map.Find(3).Get(out int showLastCharacterDuration);

            Assert.AreEqual(mode, (int)hiddenInput.Mode, "Should be equal!");
            Assert.AreEqual(substituteCharacter, Convert.ToInt32(hiddenInput.SubstituteCharacter), "Should be equal!");
            Assert.AreEqual(substituteCount, hiddenInput.SubstituteCount, "Should be equal!");
            Assert.AreEqual(showLastCharacterDuration, hiddenInput.ShowLastCharacterDuration, "Should be equal!");

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