3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Collections.Generic;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("internal/Application/NUIWidgetCoreBackend")]
14 public class InternalNUIWidgetCoreBackendTest
16 private const string tag = "NUITEST";
17 private string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
22 tlog.Info(tag, "Init() is called!");
28 tlog.Info(tag, "Destroy() is called!");
32 [Description("NUIWidgetCoreBackend constructor")]
33 [Property("AUTHOR", "guowei.wang@samsung.com")]
34 public void NUIWidgetCoreBackendConstructor()
36 tlog.Debug(tag, $"NUIWidgetCoreBackendConstructor START");
38 var testingTarget = new NUIWidgetCoreBackend();
39 Assert.IsNotNull(testingTarget, "should be not null");
40 Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
42 testingTarget.Dispose();
43 tlog.Debug(tag, $"NUIWidgetCoreBackendConstructor END (OK)");
47 [Description("NUIWidgetCoreBackend constructor with stylesheet")]
48 [Property("AUTHOR", "guowei.wang@samsung.com")]
49 public void NUIWidgetCoreBackendConstructorWithStylesheet()
51 tlog.Debug(tag, $"NUIWidgetCoreBackendConstructorWithStylesheet START");
53 var dummy = resource + "/style/Test_Style_Manager.json";
54 var testingTarget = new NUIWidgetCoreBackend(dummy);
55 Assert.IsNotNull(testingTarget, "should be not null");
56 Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
58 testingTarget.Dispose();
59 tlog.Debug(tag, $"NUIWidgetCoreBackendConstructorWithStylesheet END (OK)");
63 [Description("NUIWidgetCoreBackend dispose")]
64 [Property("AUTHOR", "guowei.wang@samsung.com")]
65 public void NUIWidgetCoreBackendDispose()
67 tlog.Debug(tag, $"NUIWidgetCoreBackendDispose START");
69 var testingTarget = new NUIWidgetCoreBackend();
70 Assert.IsNotNull(testingTarget, "should be not null");
71 Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
75 testingTarget.Dispose();
79 tlog.Error(tag, "Caught Exception" + e.ToString());
80 Assert.Fail("Caught Exception" + e.ToString());
83 tlog.Debug(tag, $"NUIWidgetCoreBackendDispose END (OK)");
87 [Description("NUIWidgetCoreBackend exit")]
88 [Property("AUTHOR", "guowei.wang@samsung.com")]
89 public void NUIWidgetCoreBackendExit()
91 tlog.Debug(tag, $"NUIWidgetCoreBackendExit START");
93 var testingTarget = new NUIWidgetCoreBackend();
94 Assert.IsNotNull(testingTarget, "should be not null");
95 Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
103 tlog.Error(tag, "Caught Exception" + e.ToString());
104 Assert.Fail("Caught Exception" + e.ToString());
107 testingTarget.Dispose();
108 tlog.Debug(tag, $"NUIWidgetCoreBackendExit END (OK)");
112 [Description("NUIWidgetCoreBackend register widget info")]
113 [Property("AUTHOR", "guowei.wang@samsung.com")]
114 public void NUIWidgetCoreBackendRegisterWidgetInfo()
116 tlog.Debug(tag, $"NUIWidgetCoreBackendRegisterWidgetInfo START");
118 var testingTarget = new NUIWidgetCoreBackend();
119 Assert.IsNotNull(testingTarget, "should be not null");
120 Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
122 var widgetInfo = new Dictionary<global::System.Type, string>();
123 testingTarget.RegisterWidgetInfo(widgetInfo);
125 testingTarget.Dispose();
126 tlog.Debug(tag, $"NUIWidgetCoreBackendRegisterWidgetInfo END (OK)");
130 [Description("NUIWidgetCoreBackend add widget info")]
131 [Property("AUTHOR", "guowei.wang@samsung.com")]
132 public void NUIWidgetCoreBackendAddWidgetInfo()
134 tlog.Debug(tag, $"NUIWidgetCoreBackendAddWidgetInfo START");
136 var testingTarget = new NUIWidgetCoreBackend();
137 Assert.IsNotNull(testingTarget, "should be not null");
138 Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
140 var widgetInfo = new Dictionary<global::System.Type, string>();
141 testingTarget.AddWidgetInfo(widgetInfo);
143 testingTarget.Dispose();
144 tlog.Debug(tag, $"NUIWidgetCoreBackendAddWidgetInfo END (OK)");