8fca723699651a7aade94c303b9da59bd4c21bfa
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Common / TSBaseObject.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/Common/BaseObject")]
13     public class InternalBaseObjectTest
14     {
15         private const string tag = "NUITEST";
16         private Widget widget = null;
17
18         [SetUp]
19         public void Init()
20         {
21             tlog.Info(tag, "Init() is called!");
22
23             widget = new Widget();
24             tlog.Debug(tag, "widget.Id : " + widget.Id);
25         }
26
27         [TearDown]
28         public void Destroy()
29         {
30             widget.Dispose();
31             widget = null;
32
33             tlog.Info(tag, "Destroy() is called!");
34         }
35
36         [Test]
37         [Category("P1")]
38         [Description("BaseObject constructor.")]
39         [Property("SPEC", "Tizen.NUI.BaseObject.BaseObject C")]
40         [Property("SPEC_URL", "-")]
41         [Property("CRITERIA", "CONSTR")]
42         [Property("AUTHOR", "guowei.wang@samsung.com")]
43         public void BaseObjectConstructor()
44         {
45             tlog.Debug(tag, $"BaseObjectConstructor START");
46
47             var testingTarget = new BaseObject(widget.SwigCPtr.Handle, false);
48             Assert.IsNotNull(testingTarget, "should not be null.");
49             Assert.IsInstanceOf<BaseObject>(testingTarget, "should be an instance of BaseObject class!");
50
51             testingTarget.Dispose();
52             tlog.Debug(tag, $"BaseObjectConstructor END (OK)");
53         }
54
55         //[Test]
56         //[Category("P1")]
57         //[Description("BaseObject DoAction.")]
58         //[Property("SPEC", "Tizen.NUI.BaseObject.DoAction M")]
59         //[Property("SPEC_URL", "-")]
60         //[Property("CRITERIA", "MR")]
61         //[Property("AUTHOR", "guowei.wang@samsung.com")]
62         //public void BaseObjectDoAction()
63         //{
64         //    tlog.Debug(tag, $"BaseObjectDoAction START");
65
66         //    var testingTarget = new BaseObject(widget.SwigCPtr.Handle, false);
67         //    Assert.IsNotNull(testingTarget, "should not be null.");
68         //    Assert.IsInstanceOf<BaseObject>(testingTarget, "should be an instance of BaseObject class!");
69
70         //    using (PropertyMap map = new PropertyMap())
71         //    {
72         //        map.Insert("ContentInfo", new PropertyValue("widget"));
73         //        var result = testingTarget.DoAction("set", map);
74         //        tlog.Debug(tag, "DoAction : " + result);
75         //    }
76
77         //    testingTarget.Dispose();
78         //    tlog.Debug(tag, $"BaseObjectDoAction END (OK)");
79         //}
80
81         //[Test]
82         //[Category("P1")]
83         //[Description("BaseObject GetTypeName.")]
84         //[Property("SPEC", "Tizen.NUI.BaseObject.GetTypeName M")]
85         //[Property("SPEC_URL", "-")]
86         //[Property("CRITERIA", "MR")]
87         //[Property("AUTHOR", "guowei.wang@samsung.com")]
88         //public void BaseObjectGetTypeName()
89         //{
90         //    tlog.Debug(tag, $"BaseObjectGetTypeName START");
91
92         //    var testingTarget = new BaseObject(widget.SwigCPtr.Handle, false);
93         //    Assert.IsNotNull(testingTarget, "should not be null.");
94         //    Assert.IsInstanceOf<BaseObject>(testingTarget, "should be an instance of BaseObject class!");
95
96         //    var result = testingTarget.GetTypeName();
97         //    tlog.Debug(tag, "TypeName : " + result);
98
99         //    testingTarget.Dispose();
100         //    tlog.Debug(tag, $"BaseObjectGetTypeName END (OK)");
101         //}
102
103         //[Test]
104         //[Category("P1")]
105         //[Description("BaseObject GetTypeInfo.")]
106         //[Property("SPEC", "Tizen.NUI.BaseObject.GetTypeInfo M")]
107         //[Property("SPEC_URL", "-")]
108         //[Property("CRITERIA", "MR")]
109         //[Property("AUTHOR", "guowei.wang@samsung.com")]
110         //public void BaseObjectGetTypeInfo()
111         //{
112         //    tlog.Debug(tag, $"BaseObjectGetTypeInfo START");
113
114         //    var testingTarget = new BaseObject(widget.SwigCPtr.Handle, false);
115         //    Assert.IsNotNull(testingTarget, "should not be null.");
116         //    Assert.IsInstanceOf<BaseObject>(testingTarget, "should be an instance of BaseObject class!");
117
118         //    using (TypeInfo info = new TypeInfo(widget.SwigCPtr.Handle, false))
119         //    {
120         //        var result = testingTarget.GetTypeInfo(info);
121         //        tlog.Debug(tag, "TypeName : " + result);
122         //    }
123
124         //    testingTarget.Dispose();
125         //    tlog.Debug(tag, $"BaseObjectGetTypeInfo END (OK)");
126         //}
127     }
128 }