3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Collections.Generic;
7 using System.Runtime.InteropServices;
9 namespace Tizen.NUI.Devel.Tests
11 using tlog = Tizen.Log;
14 [Description("public/BaseComponents/TextEvent")]
15 public class PublicTextEventTest
17 private const string tag = "NUITEST";
22 tlog.Info(tag, "Init() is called!");
28 tlog.Info(tag, "Destroy() is called!");
33 [Description("TextEvent.AnchorClickedEventArgs Href.")]
34 [Property("SPEC", "Tizen.NUI.TextEvent.AnchorClickedEventArgs.Href A")]
35 [Property("SPEC_URL", "-")]
36 [Property("CRITERIA", "PRW")]
37 [Property("AUTHOR", "guowei.wang@samsung.com")]
38 public void TextEventAnchorClickedEventArgsHref()
40 tlog.Debug(tag, $"TextEventAnchorClickedEventArgsHref START");
42 TextLabel label = new TextLabel()
47 var testingTarget = new AnchorClickedEventArgs();
48 Assert.IsNotNull(testingTarget, "Can't create success object AnchorClickedEventArgs");
49 Assert.IsInstanceOf<AnchorClickedEventArgs>(testingTarget, "Should be an instance of AnchorClickedEventArgs type.");
51 testingTarget.Href = Marshal.PtrToStringAnsi(label.SwigCPtr.Handle);
52 Assert.IsNotNull(testingTarget.Href, "Should be not null.");
55 tlog.Debug(tag, $"TextEventAnchorClickedEventArgsHref END (OK)");
60 [Description("TextEvent.InputFilteredEventArgs Type.")]
61 [Property("SPEC", "Tizen.NUI.TextEvent.InputFilteredEventArgs.Type A")]
62 [Property("SPEC_URL", "-")]
63 [Property("CRITERIA", "PRW")]
64 [Property("AUTHOR", "guowei.wang@samsung.com")]
65 public void TextEventInputFilteredEventArgsType()
67 tlog.Debug(tag, $"TextEventInputFilteredEventArgsType START");
69 TextLabel label = new TextLabel()
74 var testingTarget = new InputFilteredEventArgs();
75 Assert.IsNotNull(testingTarget, "Can't create success object InputFilteredEventArgs");
76 Assert.IsInstanceOf<InputFilteredEventArgs>(testingTarget, "Should be an instance of InputFilteredEventArgs type.");
78 testingTarget.Type = InputFilterType.Accept;
79 Assert.IsNotNull(testingTarget.Type, "Should be not null.");
82 tlog.Debug(tag, $"TextEventInputFilteredEventArgsType END (OK)");