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/Application/ComponentApplication")]
13 public class InternalComponentApplicationTest
15 private const string tag = "NUITEST";
16 private string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
17 private delegate bool dummyCallback(IntPtr application);
19 private bool OnDummyCallback(IntPtr data)
27 tlog.Info(tag, "Init() is called!");
33 tlog.Info(tag, "Destroy() is called!");
38 [Description("ComponentApplication constructor.")]
39 [Property("SPEC", "Tizen.NUI.ComponentApplication.ComponentApplication C")]
40 [Property("SPEC_URL", "-")]
41 [Property("CRITERIA", "CONSTR")]
42 [Property("AUTHOR", "guowei.wang@samsung.com")]
43 public void ComponentApplicationConstructor()
45 tlog.Debug(tag, $"ComponentApplicationConstructor START");
47 using (Widget widget = new Widget())
49 var testingTarget = new ComponentApplication(widget.SwigCPtr.Handle, true);
50 Assert.IsNotNull(testingTarget, "should be not null");
51 Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
53 testingTarget.Dispose();
56 tlog.Debug(tag, $"ComponentApplicationConstructor END (OK)");
61 [Description("ComponentApplication CreateNativeSignal.")]
62 [Property("SPEC", "Tizen.NUI.ComponentApplication.CreateNativeSignal M")]
63 [Property("SPEC_URL", "-")]
64 [Property("CRITERIA", "MR")]
65 [Property("AUTHOR", "guowei.wang@samsung.com")]
66 public void ComponentApplicationCreateNativeSignal()
68 tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal START");
70 using (Widget widget = new Widget())
72 var testingTarget = new ComponentApplication(widget.SwigCPtr.Handle, true);
73 Assert.IsNotNull(testingTarget, "should be not null");
74 Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
76 var result = testingTarget.CreateNativeSignal();
77 Assert.IsNotNull(result, "should be not null");
78 Assert.IsInstanceOf<ApplicationSignal>(result, "should be an instance of ApplicationSignal class!");
80 testingTarget.Dispose();
83 tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal END (OK)");