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/Common/BaseObject")]
13 public class InternalBaseObjectTest
15 private const string tag = "NUITEST";
16 private Widget widget = null;
21 tlog.Info(tag, "Init() is called!");
23 widget = new Widget();
24 tlog.Debug(tag, "widget.Id : " + widget.Id);
33 tlog.Info(tag, "Destroy() is called!");
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()
45 tlog.Debug(tag, $"BaseObjectConstructor START");
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!");
51 testingTarget.Dispose();
52 tlog.Debug(tag, $"BaseObjectConstructor END (OK)");
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()
64 // tlog.Debug(tag, $"BaseObjectDoAction START");
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!");
70 // using (PropertyMap map = new PropertyMap())
72 // map.Insert("ContentInfo", new PropertyValue("widget"));
73 // var result = testingTarget.DoAction("set", map);
74 // tlog.Debug(tag, "DoAction : " + result);
77 // testingTarget.Dispose();
78 // tlog.Debug(tag, $"BaseObjectDoAction END (OK)");
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()
90 // tlog.Debug(tag, $"BaseObjectGetTypeName START");
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!");
96 // var result = testingTarget.GetTypeName();
97 // tlog.Debug(tag, "TypeName : " + result);
99 // testingTarget.Dispose();
100 // tlog.Debug(tag, $"BaseObjectGetTypeName END (OK)");
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()
112 // tlog.Debug(tag, $"BaseObjectGetTypeInfo START");
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!");
118 // using (TypeInfo info = new TypeInfo(widget.SwigCPtr.Handle, false))
120 // var result = testingTarget.GetTypeInfo(info);
121 // tlog.Debug(tag, "TypeName : " + result);
124 // testingTarget.Dispose();
125 // tlog.Debug(tag, $"BaseObjectGetTypeInfo END (OK)");