3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("internal/EXaml/Action/GetValueAction")]
13 public class InternalGetValueActionTest
15 private const string tag = "NUITEST";
17 internal class MyAction : Tizen.NUI.EXaml.Action
19 public void Init() { }
21 public void OnActive() { }
23 EXaml.Action EXaml.Action.DealChar(char c)
32 tlog.Info(tag, "Init() is called!");
38 tlog.Info(tag, "Destroy() is called!");
43 [Description("GetValueAction constructor.")]
44 [Property("SPEC", "Tizen.NUI.EXaml.GetValueAction.GetValueAction C")]
45 [Property("SPEC_URL", "-")]
46 [Property("CRITERIA", "CONSTR")]
47 [Property("AUTHOR", "guowei.wang@samsung.com")]
48 public void EXamlGetValueActionConstructor()
50 tlog.Debug(tag, $"EXamlGetValueActionConstructor START");
52 var testingTarget = new Tizen.NUI.EXaml.GetValueAction(')', new MyAction());
53 Assert.IsNotNull(testingTarget, "Can't create success object GetValueAction");
54 Assert.IsInstanceOf<Tizen.NUI.EXaml.GetValueAction>(testingTarget, "Should be an instance of GetValueAction type.");
56 tlog.Debug(tag, $"EXamlGetValueActionConstructor END (OK)");
61 [Description("GetValueAction Init.")]
62 [Property("SPEC", "Tizen.NUI.EXaml.GetValueAction.Init M")]
63 [Property("SPEC_URL", "-")]
64 [Property("CRITERIA", "MR")]
65 [Property("AUTHOR", "guowei.wang@samsung.com")]
66 public void EXamlGetValueActionInit()
68 tlog.Debug(tag, $"EXamlGetValueActionInit START");
70 var testingTarget = new Tizen.NUI.EXaml.GetValueAction(')', new MyAction());
71 Assert.IsNotNull(testingTarget, "Can't create success object GetValueAction");
72 Assert.IsInstanceOf<Tizen.NUI.EXaml.GetValueAction>(testingTarget, "Should be an instance of GetValueAction type.");
80 tlog.Debug(tag, e.Message.ToString());
81 Assert.Fail("Caught Exception : Failed!");
84 tlog.Debug(tag, $"EXamlGetValueActionInit END (OK)");
89 [Description("GetValueAction DealChar.")]
90 [Property("SPEC", "Tizen.NUI.EXaml.GetValueAction.DealChar M")]
91 [Property("SPEC_URL", "-")]
92 [Property("CRITERIA", "MR")]
93 [Property("AUTHOR", "guowei.wang@samsung.com")]
94 public void EXamlGetValueActionDealChar()
96 tlog.Debug(tag, $"EXamlGetValueActionDealChar START");
98 var testingTarget = new Tizen.NUI.EXaml.GetValueAction('\"', new MyAction());
99 Assert.IsNotNull(testingTarget, "Can't create success object GetValueAction");
100 Assert.IsInstanceOf<Tizen.NUI.EXaml.GetValueAction>(testingTarget, "Should be an instance of GetValueAction type.");
104 testingTarget.DealChar('\"');
108 tlog.Error(tag, e.Message.ToString());
109 Assert.Fail("Caught Exception : Failed!");
112 var testingTarget1 = new Tizen.NUI.EXaml.GetValueAction('y', new MyAction());
115 testingTarget1.DealChar('y');
119 tlog.Error(tag, e.Message.ToString());
120 Assert.Fail("Caught Exception : Failed!");
123 var testingTarget2 = new Tizen.NUI.EXaml.GetValueAction('z', new MyAction());
126 testingTarget2.DealChar('z');
130 tlog.Error(tag, e.Message.ToString());
131 Assert.Fail("Caught Exception : Failed!");
134 var testingTarget3 = new Tizen.NUI.EXaml.GetValueAction('m', new MyAction());
137 testingTarget3.DealChar('3');
141 tlog.Info(tag, e.Message.ToString());
142 Assert.Fail("Caught Exception : Failed!");
145 tlog.Debug(tag, $"EXamlGetValueActionDealChar END (OK)");
150 [Description("GetValueAction DealChar, ('\"' != sign)")]
151 [Property("SPEC", "Tizen.NUI.EXaml.GetValueAction.DealChar M")]
152 [Property("SPEC_URL", "-")]
153 [Property("CRITERIA", "MR")]
154 [Property("AUTHOR", "guowei.wang@samsung.com")]
155 public void EXamlGetValueActionDealChar2()
157 tlog.Debug(tag, $"EXamlGetValueActionDealChar2 START");
159 var testingTarget = new Tizen.NUI.EXaml.GetValueAction('\'', new MyAction());
160 Assert.IsNotNull(testingTarget, "Can't create success object GetValueAction");
161 Assert.IsInstanceOf<Tizen.NUI.EXaml.GetValueAction>(testingTarget, "Should be an instance of GetValueAction type.");
165 testingTarget.DealChar(' ');
169 tlog.Error(tag, e.Message.ToString());
170 Assert.Fail("Caught Exception : Failed!");
175 testingTarget.DealChar('(');
179 tlog.Error(tag, e.Message.ToString());
180 Assert.Fail("Caught Exception : Failed!");
183 tlog.Debug(tag, $"EXamlGetValueActionDealChar2 END (OK)");