[NUI] Update NUI.Devel to fix block and crash issues.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / EXaml / Action / TSGetValueAction.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("internal/EXaml/Action/GetValueAction")]
13     public class InternalGetValueActionTest
14     {
15         private const string tag = "NUITEST";
16
17         internal class MyAction : Tizen.NUI.EXaml.Action
18         {
19             public void Init() { }
20
21             public void OnActive() { }
22
23             EXaml.Action EXaml.Action.DealChar(char c)
24             {
25                 return this;
26             }
27         }
28
29         [SetUp]
30         public void Init()
31         {
32             tlog.Info(tag, "Init() is called!");
33         }
34
35         [TearDown]
36         public void Destroy()
37         {
38             tlog.Info(tag, "Destroy() is called!");
39         }
40
41         [Test]
42         [Category("P1")]
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()
49         {
50             tlog.Debug(tag, $"EXamlGetValueActionConstructor START");
51
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.");
55
56             tlog.Debug(tag, $"EXamlGetValueActionConstructor END (OK)");
57         }
58
59         [Test]
60         [Category("P1")]
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()
67         {
68             tlog.Debug(tag, $"EXamlGetValueActionInit START");
69
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.");
73
74             try
75             {
76                 testingTarget.Init();
77             }
78             catch (Exception e)
79             {
80                 tlog.Debug(tag, e.Message.ToString());
81                 Assert.Fail("Caught Exception : Failed!");
82             }
83
84             tlog.Debug(tag, $"EXamlGetValueActionInit END (OK)");
85         }
86     }
87 }