1 using NUnit.Framework;
2 using NUnit.Framework.TUnit;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("public/Input/Key")]
13 internal class PublicKeyTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("Create a Key object.")]
32 [Property("SPEC", "Tizen.NUI.Key.Key C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("COVPARAM", "")]
36 [Property("AUTHOR", "guowei.wang@samsung.com")]
37 public void KeyConstructor()
39 tlog.Debug(tag, $"KeyConstructor START");
40 Key a1 = new Key("keyName", "keyString", 97, 90, 100000, Key.StateType.Down);
42 tlog.Debug(tag, $"KeyConstructor END (OK)");
43 Assert.Pass("KeyConstructor");
48 [Description("Key LogicalKey")]
49 [Property("SPEC", "Tizen.NUI.Key.LogicalKey A")]
50 [Property("SPEC_URL", "-")]
51 [Property("CRITERIA", "PRW")]
52 [Property("AUTHOR", "guowei.wang@samsung.com")]
53 public void KeyLogicalKey()
55 tlog.Debug(tag, $"KeyLogicalKey START");
57 string b1 = a1.LogicalKey;
59 tlog.Debug(tag, $"KeyLogicalKey END (OK)");
60 Assert.Pass("KeyLogicalKey");
65 [Description("Key KeyPressed")]
66 [Property("SPEC", "Tizen.NUI.Key.KeyPressed A")]
67 [Property("SPEC_URL", "-")]
68 [Property("CRITERIA", "PRW")]
69 [Property("AUTHOR", "guowei.wang@samsung.com")]
70 public void KeyKeyPressed()
72 tlog.Debug(tag, $"KeyKeyPressed START");
74 string b1 = a1.KeyPressed;
76 tlog.Debug(tag, $"KeyKeyPressed END (OK)");
77 Assert.Pass("KeyKeyPressed");
82 [Description("Key KeyString")]
83 [Property("SPEC", "Tizen.NUI.Key.KeyString A")]
84 [Property("SPEC_URL", "-")]
85 [Property("CRITERIA", "PRW")]
86 [Property("AUTHOR", "guowei.wang@samsung.com")]
87 public void KeyKeyString()
89 tlog.Debug(tag, $"KeyKeyString START");
91 string b1 = a1.KeyString;
93 tlog.Debug(tag, $"KeyKeyString END (OK)");
94 Assert.Pass("KeyKeyString");
99 [Description("Key KeyModifier")]
100 [Property("SPEC", "Tizen.NUI.Key.KeyModifier A")]
101 [Property("SPEC_URL", "-")]
102 [Property("CRITERIA", "PRW")]
103 [Property("AUTHOR", "guowei.wang@samsung.com")]
104 public void KeyKeyModifier()
106 tlog.Debug(tag, $"KeyKeyModifier START");
108 int b1 = a1.KeyModifier;
110 tlog.Debug(tag, $"KeyKeyModifier END (OK)");
111 Assert.Pass("KeyKeyModifier");
116 [Description("Key Time")]
117 [Property("SPEC", "Tizen.NUI.Key.Time A")]
118 [Property("SPEC_URL", "-")]
119 [Property("CRITERIA", "PRW")]
120 [Property("AUTHOR", "guowei.wang@samsung.com")]
121 public void KeyTime()
123 tlog.Debug(tag, $"KeyTime START");
130 tlog.Debug(tag, $"KeyTime END (OK)");
131 Assert.Pass("KeyTime");
136 [Description("Key GetKeyFromPtr")]
137 [Property("SPEC", "Tizen.NUI.Key.GetKeyFromPtr M")]
138 [Property("SPEC_URL", "-")]
139 [Property("CRITERIA", "MR")]
140 [Property("AUTHOR", "guowei.wang@samsung.com")]
141 public void KeyGetKeyFromPtr()
143 tlog.Debug(tag, $"KeyGetKeyFromPtr START");
146 Key b1 = Key.GetKeyFromPtr(a1.SwigCPtr.Handle);
150 tlog.Debug(tag, $"KeyGetKeyFromPtr END (OK)");
151 Assert.Pass("KeyGetKeyFromPtr");