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("public/Application/NUIFrameComponent")]
13 class PublicNUIFrameComponentTest
15 private const string tag = "NUITEST";
17 internal class MyNUIFrameComponent : NUIFrameComponent
19 public MyNUIFrameComponent() : base()
22 public void MyOnCreate()
27 public void MyOnStart(Tizen.Applications.AppControl appControl, bool restarted)
29 base.OnStart(appControl, restarted);
32 public void MyOnResume()
37 public void MyOnPause()
42 public void MyOnStop()
47 public void MyOnDestroy()
56 tlog.Info(tag, "Init() is called!");
62 tlog.Info(tag, "Destroy() is called!");
67 [Description("NUIFrameComponent NUIWindowInfo")]
68 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.NUIWindowInfo A")]
69 [Property("SPEC_URL", "-")]
70 [Property("CRITERIA", "PRW")]
71 [Property("AUTHOR", "guowei.wang@samsung.com")]
72 public void NUIFrameComponentNUIWindowInfo()
74 tlog.Debug(tag, $"NUIFrameComponentNUIWindowInfo START");
76 var testingTarget = new NUIFrameComponent();
77 Assert.IsNotNull(testingTarget, "Should be not null.");
78 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
80 testingTarget.NUIWindowInfo = new NUIWindowInfo(Window.Instance);
81 tlog.Debug(tag, "testingTarget.NUIWindowInfo : " + testingTarget.NUIWindowInfo);
82 Assert.IsNotNull(testingTarget.NUIWindowInfo);
84 tlog.Debug(tag, $"NUIFrameComponentNUIWindowInfo END (OK)");
89 [Description("NUIFrameComponent Window")]
90 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.Window A")]
91 [Property("SPEC_URL", "-")]
92 [Property("CRITERIA", "PRW")]
93 [Property("AUTHOR", "guowei.wang@samsung.com")]
94 public void NUIFrameComponentWindow()
96 tlog.Debug(tag, $"NUIFrameComponentWindow START");
98 var testingTarget = new NUIFrameComponent();
99 Assert.IsNotNull(testingTarget, "Should be not null.");
100 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
104 testingTarget.Window = NUIApplication.GetDefaultWindow();
105 tlog.Debug(tag, "Window :" + testingTarget.Window);
109 tlog.Debug(tag, e.Message.ToString());
110 Assert.Fail("Caught Exception : Failed!");
113 tlog.Debug(tag, $"NUIFrameComponentWindow END (OK)");
118 [Description("NUIFrameComponent OnCreate.")]
119 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnCreate M")]
120 [Property("SPEC_URL", "-")]
121 [Property("CRITERIA", "MR")]
122 [Property("AUTHOR", "guowei.wang@samsung.com")]
123 public void NUIFrameComponentOnCreate()
125 tlog.Debug(tag, $"NUIFrameComponentOnCreate START");
127 var testingTarget = new MyNUIFrameComponent();
128 Assert.IsNotNull(testingTarget, "Should be not null.");
129 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
133 testingTarget.MyOnCreate();
137 tlog.Debug(tag, e.Message.ToString());
138 Assert.Fail("Caught Exception: Failed!");
141 tlog.Debug(tag, $"NUIFrameComponentOnCreate END (OK)");
146 [Description("NUIFrameComponent OnStart.")]
147 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnStart M")]
148 [Property("SPEC_URL", "-")]
149 [Property("CRITERIA", "MR")]
150 [Property("AUTHOR", "guowei.wang@samsung.com")]
151 public void NUIFrameComponentOnStart()
153 tlog.Debug(tag, $"NUIFrameComponentOnStart START");
155 var testingTarget = new MyNUIFrameComponent();
156 Assert.IsNotNull(testingTarget, "Should be not null.");
157 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
161 Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl(true);
162 testingTarget.MyOnStart(appControl, false);
166 tlog.Debug(tag, e.Message.ToString());
167 Assert.Fail("Caught Exception: Failed!");
170 tlog.Debug(tag, $"NUIFrameComponentOnStart END (OK)");
175 [Description("NUIFrameComponent OnResume.")]
176 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnResume M")]
177 [Property("SPEC_URL", "-")]
178 [Property("CRITERIA", "MR")]
179 [Property("AUTHOR", "guowei.wang@samsung.com")]
180 public void NUIFrameComponentOnResume()
182 tlog.Debug(tag, $"NUIFrameComponentOnResume START");
184 var testingTarget = new MyNUIFrameComponent();
185 Assert.IsNotNull(testingTarget, "Should be not null.");
186 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
190 testingTarget.MyOnResume();
194 tlog.Debug(tag, e.Message.ToString());
195 Assert.Fail("Caught Exception: Failed!");
198 tlog.Debug(tag, $"NUIFrameComponentOnResume END (OK)");
203 [Description("NUIFrameComponent OnPause.")]
204 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnPause M")]
205 [Property("SPEC_URL", "-")]
206 [Property("CRITERIA", "MR")]
207 [Property("AUTHOR", "guowei.wang@samsung.com")]
208 public void NUIFrameComponentOnPause()
210 tlog.Debug(tag, $"NUIFrameComponentOnPause START");
212 var testingTarget = new MyNUIFrameComponent();
213 Assert.IsNotNull(testingTarget, "Should be not null.");
214 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
218 testingTarget.MyOnPause();
222 tlog.Debug(tag, e.Message.ToString());
223 Assert.Fail("Caught Exception: Failed!");
226 tlog.Debug(tag, $"NUIFrameComponentOnPause END (OK)");
231 [Description("NUIFrameComponent OnStop.")]
232 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnStop M")]
233 [Property("SPEC_URL", "-")]
234 [Property("CRITERIA", "MR")]
235 [Property("AUTHOR", "guowei.wang@samsung.com")]
236 public void NUIFrameComponentOnStop()
238 tlog.Debug(tag, $"NUIFrameComponentOnStop START");
240 var testingTarget = new MyNUIFrameComponent();
241 Assert.IsNotNull(testingTarget, "Should be not null.");
242 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
246 testingTarget.MyOnStop();
250 tlog.Debug(tag, e.Message.ToString());
251 Assert.Fail("Caught Exception: Failed!");
254 tlog.Debug(tag, $"NUIFrameComponentOnStop END (OK)");
259 [Description("NUIFrameComponent OnDestroy.")]
260 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnDestroy M")]
261 [Property("SPEC_URL", "-")]
262 [Property("CRITERIA", "MR")]
263 [Property("AUTHOR", "guowei.wang@samsung.com")]
264 public void NUIFrameComponentOnDestroy()
266 tlog.Debug(tag, $"NUIFrameComponentOnDestroy START");
268 var testingTarget = new MyNUIFrameComponent();
269 Assert.IsNotNull(testingTarget, "Should be not null.");
270 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
274 testingTarget.MyOnDestroy();
278 tlog.Debug(tag, e.Message.ToString());
279 Assert.Fail("Caught Exception: Failed!");
282 tlog.Debug(tag, $"NUIFrameComponentOnDestroy END (OK)");