3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using Tizen.NUI.Binding;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("internal/Application/Application")]
14 public class InternalApplicationTest
16 private const string tag = "NUITEST";
18 private delegate bool dummyCallback(IntPtr application);
19 private bool OnDummyCallback(IntPtr data)
24 internal class MyApplication : Application
26 public MyApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
29 public void OnDispose(DisposeTypes type)
38 tlog.Info(tag, "Init() is called!");
44 tlog.Info(tag, "Destroy() is called!");
49 [Description("NUIApplicationInitEventArgs Application.Get.")]
50 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationInitEventArgs.Application A")]
51 [Property("SPEC_URL", "-")]
52 [Property("CRITERIA", "PRW")]
53 [Property("AUTHOR", "guowei.wang@samsung.com")]
54 public void NUIApplicationInitEventArgsGet()
56 tlog.Debug(tag, $"NUIApplicationInitEventArgsGet START");
58 var testingTarget = new NUIApplicationInitEventArgs();
59 Assert.IsNotNull(testingTarget, "should be not null");
60 Assert.IsInstanceOf<NUIApplicationInitEventArgs>(testingTarget, "should be an instance of testing target class!");
62 var result = testingTarget.Application;
63 Assert.IsNull(result);
65 tlog.Debug(tag, $"NUIApplicationInitEventArgsGet END (OK)");
70 [Description("NUIApplicationInitEventArgs Application.Set.")]
71 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationInitEventArgs.Application A")]
72 [Property("SPEC_URL", "-")]
73 [Property("CRITERIA", "PRW")]
74 [Property("AUTHOR", "guowei.wang@samsung.com")]
75 public void NUIApplicationInitEventArgsSet()
77 tlog.Debug(tag, $"NUIApplicationInitEventArgsSet START");
79 var testingTarget = new NUIApplicationInitEventArgs();
80 Assert.IsNotNull(testingTarget, "should be not null");
81 Assert.IsInstanceOf<NUIApplicationInitEventArgs>(testingTarget, "should be an instance of testing target class!");
83 var g_result = testingTarget.Application;
84 Assert.IsNull(g_result);
86 testingTarget.Application = Application.Current;
87 var s_result = testingTarget.Application;
88 Assert.IsNotNull(s_result);
90 tlog.Debug(tag, $"NUIApplicationInitEventArgsSet END (OK)");
95 [Description("NUIApplicationTerminatingEventArgs Application.Get.")]
96 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationTerminatingEventArgs.Application A")]
97 [Property("SPEC_URL", "-")]
98 [Property("CRITERIA", "PRW")]
99 [Property("AUTHOR", "guowei.wang@samsung.com")]
100 public void NUIApplicationTerminatingEventArgsGet()
102 tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsGet START");
104 var testingTarget = new NUIApplicationTerminatingEventArgs();
105 Assert.IsNotNull(testingTarget, "should be not null");
106 Assert.IsInstanceOf<NUIApplicationTerminatingEventArgs>(testingTarget, "should be an instance of testing target class!");
108 var result = testingTarget.Application;
109 Assert.IsNull(result);
111 tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsGet END (OK)");
116 [Description("NUIApplicationTerminatingEventArgs Application.Set.")]
117 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationTerminatingEventArgs.Application A")]
118 [Property("SPEC_URL", "-")]
119 [Property("CRITERIA", "PRW")]
120 [Property("AUTHOR", "guowei.wang@samsung.com")]
121 public void NUIApplicationTerminatingEventArgsSet()
123 tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsSet START");
125 var testingTarget = new NUIApplicationTerminatingEventArgs();
126 Assert.IsNotNull(testingTarget, "should be not null");
127 Assert.IsInstanceOf<NUIApplicationTerminatingEventArgs>(testingTarget, "should be an instance of testing target class!");
129 var g_result = testingTarget.Application;
130 Assert.IsNull(g_result);
132 testingTarget.Application = Application.Current;
133 var s_result = testingTarget.Application;
134 Assert.IsNotNull(s_result);
136 tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsSet END (OK)");
141 [Description("NUIApplicationPausedEventArgs Application.Get.")]
142 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationPausedEventArgs.Application A")]
143 [Property("SPEC_URL", "-")]
144 [Property("CRITERIA", "PRW")]
145 [Property("AUTHOR", "guowei.wang@samsung.com")]
146 public void NUIApplicationPausedEventArgsGet()
148 tlog.Debug(tag, $"NUIApplicationPausedEventArgsGet START");
150 var testingTarget = new NUIApplicationPausedEventArgs();
151 Assert.IsNotNull(testingTarget, "should be not null");
152 Assert.IsInstanceOf<NUIApplicationPausedEventArgs>(testingTarget, "should be an instance of testing target class!");
154 var result = testingTarget.Application;
155 Assert.IsNull(result);
157 tlog.Debug(tag, $"NUIApplicationPausedEventArgsGet END (OK)");
162 [Description("NUIApplicationPausedEventArgs Application.Set.")]
163 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationPausedEventArgs.Application A")]
164 [Property("SPEC_URL", "-")]
165 [Property("CRITERIA", "PRW")]
166 [Property("AUTHOR", "guowei.wang@samsung.com")]
167 public void NUIApplicationPausedEventArgsSet()
169 tlog.Debug(tag, $"NUIApplicationPausedEventArgsSet START");
171 var testingTarget = new NUIApplicationPausedEventArgs();
172 Assert.IsNotNull(testingTarget, "should be not null");
173 Assert.IsInstanceOf<NUIApplicationPausedEventArgs>(testingTarget, "should be an instance of testing target class!");
175 var g_result = testingTarget.Application;
176 Assert.IsNull(g_result);
178 testingTarget.Application = Application.Current;
179 var s_result = testingTarget.Application;
180 Assert.IsNotNull(s_result);
182 tlog.Debug(tag, $"NUIApplicationPausedEventArgsSet END (OK)");
187 [Description("NUIApplicationResumedEventArgs Application.Get.")]
188 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResumedEventArgs.Application A")]
189 [Property("SPEC_URL", "-")]
190 [Property("CRITERIA", "PRW")]
191 [Property("AUTHOR", "guowei.wang@samsung.com")]
192 public void NUIApplicationResumedEventArgsGet()
194 tlog.Debug(tag, $"NUIApplicationResumedEventArgsGet START");
196 var testingTarget = new NUIApplicationResumedEventArgs();
197 Assert.IsNotNull(testingTarget, "should be not null");
198 Assert.IsInstanceOf<NUIApplicationResumedEventArgs>(testingTarget, "should be an instance of testing target class!");
200 var result = testingTarget.Application;
201 Assert.IsNull(result);
203 tlog.Debug(tag, $"NUIApplicationResumedEventArgsGet END (OK)");
208 [Description("NUIApplicationResumedEventArgs Application.Set.")]
209 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResumedEventArgs.Application A")]
210 [Property("SPEC_URL", "-")]
211 [Property("CRITERIA", "PRW")]
212 [Property("AUTHOR", "guowei.wang@samsung.com")]
213 public void NUIApplicationResumedEventArgsSet()
215 tlog.Debug(tag, $"NUIApplicationResumedEventArgsSet START");
217 var testingTarget = new NUIApplicationResumedEventArgs();
218 Assert.IsNotNull(testingTarget, "should be not null");
219 Assert.IsInstanceOf<NUIApplicationResumedEventArgs>(testingTarget, "should be an instance of testing target class!");
221 var g_result = testingTarget.Application;
222 Assert.IsNull(g_result);
224 testingTarget.Application = Application.Current;
225 var s_result = testingTarget.Application;
226 Assert.IsNotNull(s_result);
228 tlog.Debug(tag, $"NUIApplicationResumedEventArgsSet END (OK)");
233 [Description("NUIApplicationResetEventArgs Application.Get.")]
234 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResetEventArgs.Application A")]
235 [Property("SPEC_URL", "-")]
236 [Property("CRITERIA", "PRW")]
237 [Property("AUTHOR", "guowei.wang@samsung.com")]
238 public void NUIApplicationResetEventArgsGet()
240 tlog.Debug(tag, $"NUIApplicationResetEventArgsGet START");
242 var testingTarget = new NUIApplicationResetEventArgs();
243 Assert.IsNotNull(testingTarget);
244 Assert.IsInstanceOf<NUIApplicationResetEventArgs>(testingTarget, "should be an instance of testing target class!");
246 var result = testingTarget.Application;
247 Assert.IsNull(result);
249 tlog.Debug(tag, $"NUIApplicationResetEventArgsGet END (OK)");
254 [Description("NUIApplicationResetEventArgs Application.Set.")]
255 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResetEventArgs.Application A")]
256 [Property("SPEC_URL", "-")]
257 [Property("CRITERIA", "PRW")]
258 [Property("AUTHOR", "guowei.wang@samsung.com")]
259 public void NUIApplicationResetEventArgsSet()
261 tlog.Debug(tag, $"NUIApplicationResetEventArgsSet START");
263 var testingTarget = new NUIApplicationResetEventArgs();
264 Assert.IsNotNull(testingTarget, "should be not null");
265 Assert.IsInstanceOf<NUIApplicationResetEventArgs>(testingTarget, "should be an instance of testing target class!");
267 var g_result = testingTarget.Application;
268 Assert.IsNull(g_result);
270 testingTarget.Application = Application.Current;
271 var s_result = testingTarget.Application;
272 Assert.IsNotNull(s_result);
274 tlog.Debug(tag, $"NUIApplicationResetEventArgsSet END (OK)");
279 [Description("NUIApplicationLanguageChangedEventArgs Application.Get.")]
280 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationLanguageChangedEventArgs.Application A")]
281 [Property("SPEC_URL", "-")]
282 [Property("CRITERIA", "PRW")]
283 [Property("AUTHOR", "guowei.wang@samsung.com")]
284 public void NUIApplicationLanguageChangedEventArgsGet()
286 tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsGet START");
288 var testingTarget = new NUIApplicationLanguageChangedEventArgs();
289 Assert.IsNotNull(testingTarget, "should be not null");
290 Assert.IsInstanceOf<NUIApplicationLanguageChangedEventArgs>(testingTarget, "should be an instance of testing target class!");
292 var result = testingTarget.Application;
293 Assert.IsNull(result);
295 tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsGet END (OK)");
300 [Description("NUIApplicationLanguageChangedEventArgs Application.Set.")]
301 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationLanguageChangedEventArgs.Application A")]
302 [Property("SPEC_URL", "-")]
303 [Property("CRITERIA", "PRW")]
304 [Property("AUTHOR", "guowei.wang@samsung.com")]
305 public void NUIApplicationLanguageChangedEventArgsSet()
307 tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsSet START");
309 var testingTarget = new NUIApplicationLanguageChangedEventArgs();
310 Assert.IsNotNull(testingTarget, "should be not null");
311 Assert.IsInstanceOf<NUIApplicationLanguageChangedEventArgs>(testingTarget, "should be an instance of testing target class!");
313 var g_result = testingTarget.Application;
314 Assert.IsNull(g_result);
316 testingTarget.Application = Application.Current;
317 var s_result = testingTarget.Application;
318 Assert.IsNotNull(s_result);
320 tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsSet END (OK)");
325 [Description("NUIApplicationRegionChangedEventArgs Application.Get.")]
326 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationRegionChangedEventArgs.Application A")]
327 [Property("SPEC_URL", "-")]
328 [Property("CRITERIA", "PRW")]
329 [Property("AUTHOR", "guowei.wang@samsung.com")]
330 public void NUIApplicationRegionChangedEventArgsGet()
332 tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsGet START");
334 var testingTarget = new NUIApplicationRegionChangedEventArgs();
335 Assert.IsNotNull(testingTarget, "should be not null");
336 Assert.IsInstanceOf<NUIApplicationRegionChangedEventArgs>(testingTarget, "should be an instance of testing target class!");
338 var result = testingTarget.Application;
339 Assert.IsNull(result);
341 tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsGet END (OK)");
346 [Description("NUIApplicationRegionChangedEventArgs Application.Set.")]
347 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationRegionChangedEventArgs.Application A")]
348 [Property("SPEC_URL", "-")]
349 [Property("CRITERIA", "PRW")]
350 [Property("AUTHOR", "guowei.wang@samsung.com")]
351 public void NUIApplicationRegionChangedEventArgsSet()
353 tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsSet START");
355 var testingTarget = new NUIApplicationRegionChangedEventArgs();
356 Assert.IsNotNull(testingTarget, "should be not null");
357 Assert.IsInstanceOf<NUIApplicationRegionChangedEventArgs>(testingTarget, "should be an instance of testing target class!");
359 var g_result = testingTarget.Application;
360 Assert.IsNull(g_result);
362 testingTarget.Application = Application.Current;
363 var s_result = testingTarget.Application;
364 Assert.IsNotNull(s_result);
366 tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsSet END (OK)");
371 [Description("NUIApplicationBatteryLowEventArgs BatteryStatus.Get.")]
372 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationBatteryLowEventArgs.BatteryStatus A")]
373 [Property("SPEC_URL", "-")]
374 [Property("CRITERIA", "PRW")]
375 [Property("AUTHOR", "guowei.wang@samsung.com")]
376 public void NUIApplicationBatteryLowEventArgsBatteryStatusGet()
378 tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusGet START");
380 var testingTarget = new NUIApplicationBatteryLowEventArgs();
381 Assert.IsNotNull(testingTarget, "should be not null");
382 Assert.IsInstanceOf<NUIApplicationBatteryLowEventArgs>(testingTarget, "should be an instance of testing target class!");
384 var result = testingTarget.BatteryStatus;
385 Assert.IsNotNull(result, "should be not null");
387 tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusGet END (OK)");
392 [Description("NUIApplicationBatteryLowEventArgs BatteryStatus.Set.")]
393 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationBatteryLowEventArgs.BatteryStatus A")]
394 [Property("SPEC_URL", "-")]
395 [Property("CRITERIA", "PRW")]
396 [Property("AUTHOR", "guowei.wang@samsung.com")]
397 public void NUIApplicationBatteryLowEventArgsBatteryStatusSet()
399 tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusSet START");
401 var testingTarget = new NUIApplicationBatteryLowEventArgs();
402 Assert.IsNotNull(testingTarget, "should be not null");
403 Assert.IsInstanceOf<NUIApplicationBatteryLowEventArgs>(testingTarget, "should be an instance of testing target class!");
405 var status = Application.BatteryStatus.Normal;
406 testingTarget.BatteryStatus = status;
408 var result = testingTarget.BatteryStatus;
409 Assert.IsNotNull(testingTarget, "should be not null");
410 Assert.AreEqual(status, result, "Retrieved result should be equal to status.");
412 tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusSet END (OK)");
417 [Description("NUIApplicationMemoryLowEventArgs MemoryStatus.Get.")]
418 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationMemoryLowEventArgs.MemoryStatus A")]
419 [Property("SPEC_URL", "-")]
420 [Property("CRITERIA", "PRW")]
421 [Property("AUTHOR", "guowei.wang@samsung.com")]
422 public void NUIApplicationMemoryLowEventArgsMemoryStatusGet()
424 tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusGet START");
426 var testingTarget = new NUIApplicationMemoryLowEventArgs();
427 Assert.IsNotNull(testingTarget, "should be not null");
428 Assert.IsInstanceOf<NUIApplicationMemoryLowEventArgs>(testingTarget, "should be an instance of testing target class!");
430 var result = testingTarget.MemoryStatus;
431 Assert.IsNotNull(result, "should be not null");
433 tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusGet END (OK)");
438 [Description("NUIApplicationMemoryLowEventArgs MemoryStatus.Set.")]
439 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationMemoryLowEventArgs.MemoryStatus A")]
440 [Property("SPEC_URL", "-")]
441 [Property("CRITERIA", "PRW")]
442 [Property("AUTHOR", "guowei.wang@samsung.com")]
443 public void NUIApplicationMemoryLowEventArgsMemoryStatusSet()
445 tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusSet START");
447 var testingTarget = new NUIApplicationMemoryLowEventArgs();
448 Assert.IsNotNull(testingTarget, "should be not null");
449 Assert.IsInstanceOf<NUIApplicationMemoryLowEventArgs>(testingTarget, "should be an instance of testing target class!");
451 var status = Application.MemoryStatus.Normal;
452 testingTarget.MemoryStatus = status;
454 var result = testingTarget.MemoryStatus;
455 Assert.IsNotNull(testingTarget, "should be not null");
456 Assert.AreEqual(status, result, "Retrieved result should be equal to status.");
458 tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusSet END (OK)");
463 [Description("NUIApplicationAppControlEventArgs Application.Get.")]
464 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.Application A")]
465 [Property("SPEC_URL", "-")]
466 [Property("CRITERIA", "PRW")]
467 [Property("AUTHOR", "guowei.wang@samsung.com")]
468 public void NUIApplicationAppControlEventArgsApplicationGet()
470 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationGet START");
472 var testingTarget = new NUIApplicationAppControlEventArgs();
473 Assert.IsNotNull(testingTarget, "should be not null");
474 Assert.IsInstanceOf<NUIApplicationAppControlEventArgs>(testingTarget, "should be an instance of testing target class!");
476 var result = testingTarget.Application;
477 Assert.IsNull(result, "should be null");
479 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationGet END (OK)");
484 [Description("NUIApplicationAppControlEventArgs Application.Set.")]
485 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.Application A")]
486 [Property("SPEC_URL", "-")]
487 [Property("CRITERIA", "PRW")]
488 [Property("AUTHOR", "guowei.wang@samsung.com")]
489 public void NUIApplicationAppControlEventArgsApplicationSet()
491 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationSet START");
493 var testingTarget = new NUIApplicationAppControlEventArgs();
494 Assert.IsNotNull(testingTarget, "should be not null");
495 Assert.IsInstanceOf<NUIApplicationAppControlEventArgs>(testingTarget, "should be an instance of testing target class!");
497 var g_result = testingTarget.Application;
498 Assert.IsNull(g_result);
500 testingTarget.Application = Application.Current;
501 var s_result = testingTarget.Application;
502 Assert.IsNotNull(s_result);
504 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationSet END (OK)");
509 [Description("NUIApplicationAppControlEventArgs VoidP.Get.")]
510 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.VoidP A")]
511 [Property("SPEC_URL", "-")]
512 [Property("CRITERIA", "PRW")]
513 [Property("AUTHOR", "guowei.wang@samsung.com")]
514 public void NUIApplicationAppControlEventArgsVoidPGet()
516 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPGet START");
518 var testingTarget = new NUIApplicationAppControlEventArgs();
519 Assert.IsNotNull(testingTarget, "should be not null");
520 Assert.IsInstanceOf<NUIApplicationAppControlEventArgs>(testingTarget, "should be an instance of testing target class!");
522 var result = testingTarget.VoidP;
523 Assert.IsNotNull(result, "should be not null");
525 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPGet END (OK)");
530 [Description("NUIApplicationAppControlEventArgs VoidP.Set.")]
531 [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.VoidP A")]
532 [Property("SPEC_URL", "-")]
533 [Property("CRITERIA", "PRW")]
534 [Property("AUTHOR", "guowei.wang@samsung.com")]
535 public void NUIApplicationAppControlEventArgsVoidPSet()
537 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPSet START");
539 var dummy = new global::System.IntPtr(0);
540 var testingTarget = new NUIApplicationAppControlEventArgs();
541 Assert.IsNotNull(testingTarget, "should be not null");
542 Assert.IsInstanceOf<NUIApplicationAppControlEventArgs>(testingTarget, "should be an instance of testing target class!");
544 testingTarget.VoidP = dummy;
546 var result = testingTarget.VoidP;
547 Assert.IsNotNull(testingTarget, "should be not null");
548 Assert.AreEqual(dummy, result, "Retrieved result should be equal to dummy.");
550 tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPSet END (OK)");
555 [Description("GetResourcesProvider IResourcesProvider Get")]
556 [Property("SPEC", "Tizen.NUI.GetResourcesProvider.IResourcesProvider.Get A")]
557 [Property("SPEC_URL", "-")]
558 [Property("CRITERIA", "PRO")]
559 [Property("AUTHOR", "guowei.wang@samsung.com")]
560 public void GetResourcesProviderIResourcesProviderGet()
562 tlog.Debug(tag, $"GetResourcesProviderIResourcesProviderGet START");
566 var testingTarget = GetResourcesProvider.Get();
567 Assert.IsNotNull(testingTarget, "should be not null");
568 Assert.IsInstanceOf<Tizen.NUI.Binding.IResourcesProvider>(testingTarget, "should be an instance of testing target class!");
572 tlog.Debug(tag, e.Message.ToString());
573 Assert.Fail("Caught Exception: Failed!");
576 tlog.Debug(tag, $"GetResourcesProviderIResourcesProviderGet END (OK)");
581 [Description("Application constructor.")]
582 [Property("SPEC", "Tizen.NUI.Application.Application C")]
583 [Property("SPEC_URL", "-")]
584 [Property("CRITERIA", "CONSTR")]
585 [Property("AUTHOR", "guowei.wang@samsung.com")]
586 public void ApplicationConstructor()
588 tlog.Debug(tag, $"ApplicationConstructor START");
590 Widget widget = new Widget();
591 var application = new WidgetApplication(widget.GetIntPtr(), false);
595 var testingTarget = new Application(application);
596 Assert.IsNotNull(testingTarget, "should be not null");
597 Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
599 testingTarget.Dispose();
603 tlog.Debug(tag, e.Message.ToString());
604 Assert.Fail("Caught Exception: Failed!");
609 tlog.Debug(tag, $"ApplicationConstructor END (OK)");
614 [Description("Application GetApplicationFromPtr.")]
615 [Property("SPEC", "Tizen.NUI.Application.GetApplicationFromPtr M")]
616 [Property("SPEC_URL", "-")]
617 [Property("CRITERIA", "MR")]
618 [Property("AUTHOR", "guowei.wang@samsung.com")]
619 public void ApplicationGetApplicationFromPtr()
621 tlog.Debug(tag, $"ApplicationGetApplicationFromPtr START");
623 Widget widget = new Widget();
624 var application = new WidgetApplication(widget.GetIntPtr(), false);
628 Application.GetApplicationFromPtr(application.SwigCPtr.Handle);
632 tlog.Debug(tag, e.Message.ToString());
633 Assert.Fail("Caught Exception: Failed!");
638 tlog.Debug(tag, $"ApplicationGetApplicationFromPtr END (OK)");
643 [Description("Application SystemResources.")]
644 [Property("SPEC", "Tizen.NUI.Application.SystemResources A")]
645 [Property("SPEC_URL", "-")]
646 [Property("CRITERIA", "PRO")]
647 [Property("AUTHOR", "guowei.wang@samsung.com")]
648 public void ApplicationSystemResources()
650 tlog.Debug(tag, $"ApplicationSystemResources START");
654 var result = Application.Instance.SystemResources;
655 tlog.Debug(tag, "SystemResources : " + result);
659 tlog.Debug(tag, e.Message.ToString());
660 Assert.Fail("Caught Exception: Failed!");
663 tlog.Debug(tag, $"ApplicationSystemResources END (OK)");
668 [Description("Application IsResourcesCreated.")]
669 [Property("SPEC", "Tizen.NUI.Application.IsResourcesCreated A")]
670 [Property("SPEC_URL", "-")]
671 [Property("CRITERIA", "PRO")]
672 [Property("AUTHOR", "guowei.wang@samsung.com")]
673 public void ApplicationIsResourcesCreated()
675 tlog.Debug(tag, $"ApplicationIsResourcesCreated START");
679 var result = Application.Instance.IsResourcesCreated;
680 tlog.Debug(tag, "IsResourcesCreated : " + result);
684 tlog.Debug(tag, e.Message.ToString());
685 Assert.Fail("Caught Exception: Failed!");
688 tlog.Debug(tag, $"ApplicationIsResourcesCreated END (OK)");
693 [Description("Application AddResourceChangedCallback.")]
694 [Property("SPEC", "Tizen.NUI.Application.AddResourceChangedCallback A")]
695 [Property("SPEC_URL", "-")]
696 [Property("CRITERIA", "PRO")]
697 [Property("AUTHOR", "guowei.wang@samsung.com")]
698 public void ApplicationAddResourceChangedCallback()
700 tlog.Debug(tag, $"ApplicationAddResourceChangedCallback START");
704 Application.AddResourceChangedCallback(new ImageView() as object, AddResourceChangedCallback);
708 tlog.Debug(tag, e.Message.ToString());
709 Assert.Fail("Caught Exception: Failed!");
712 tlog.Debug(tag, $"ApplicationAddResourceChangedCallback END (OK)");
715 private void AddResourceChangedCallback(object sender, ResourcesChangedEventArgs e) { }
719 [Description("Application Paused.")]
720 [Property("SPEC", "Tizen.NUI.Application.Paused A")]
721 [Property("SPEC_URL", "-")]
722 [Property("CRITERIA", "PRW")]
723 [Property("AUTHOR", "guowei.wang@samsung.com")]
724 public void ApplicationPaused()
726 tlog.Debug(tag, $"ApplicationPaused START");
730 Application.Instance.Paused += MyOnPaused;
731 Application.Instance.Paused -= MyOnPaused;
735 tlog.Debug(tag, e.Message.ToString());
736 Assert.Fail("Caught Exception: Failed!");
739 tlog.Debug(tag, $"ApplicationPaused END (OK)");
744 [Description("Application Resumed.")]
745 [Property("SPEC", "Tizen.NUI.Application.Paused A")]
746 [Property("SPEC_URL", "-")]
747 [Property("CRITERIA", "PRW")]
748 [Property("AUTHOR", "guowei.wang@samsung.com")]
749 public void ApplicationResumed()
751 tlog.Debug(tag, $"ApplicationResumed START");
755 Application.Instance.Resumed += MyOnResumed;
756 Application.Instance.Resumed -= MyOnResumed;
760 tlog.Debug(tag, e.Message.ToString());
761 Assert.Fail("Caught Exception: Failed!");
764 tlog.Debug(tag, $"ApplicationResumed END (OK)");
769 [Description("Application Reset.")]
770 [Property("SPEC", "Tizen.NUI.Application.Reset A")]
771 [Property("SPEC_URL", "-")]
772 [Property("CRITERIA", "PRW")]
773 [Property("AUTHOR", "guowei.wang@samsung.com")]
774 public void ApplicationReset()
776 tlog.Debug(tag, $"ApplicationReset START");
780 Application.Instance.Reset += MyOnReset;
781 Application.Instance.Reset -= MyOnReset;
785 tlog.Debug(tag, e.Message.ToString());
786 Assert.Fail("Caught Exception: Failed!");
789 tlog.Debug(tag, $"ApplicationReset END (OK)");
794 [Description("Application LanguageChanged.")]
795 [Property("SPEC", "Tizen.NUI.Application.LanguageChanged A")]
796 [Property("SPEC_URL", "-")]
797 [Property("CRITERIA", "PRW")]
798 [Property("AUTHOR", "guowei.wang@samsung.com")]
799 public void ApplicationLanguageChanged()
801 tlog.Debug(tag, $"ApplicationLanguageChanged START");
805 Application.Instance.LanguageChanged += MyOnLanguageChanged;
806 Application.Instance.LanguageChanged -= MyOnLanguageChanged;
810 tlog.Debug(tag, e.Message.ToString());
811 Assert.Fail("Caught Exception: Failed!");
814 tlog.Debug(tag, $"ApplicationLanguageChanged END (OK)");
819 [Description("Application AppControl.")]
820 [Property("SPEC", "Tizen.NUI.Application.AppControl A")]
821 [Property("SPEC_URL", "-")]
822 [Property("CRITERIA", "PRW")]
823 [Property("AUTHOR", "guowei.wang@samsung.com")]
824 public void ApplicationAppControl()
826 tlog.Debug(tag, $"ApplicationAppControl START");
830 Application.Instance.AppControl += MyOnAppControl;
831 Application.Instance.AppControl -= MyOnAppControl;
835 tlog.Debug(tag, e.Message.ToString());
836 Assert.Fail("Caught Exception: Failed!");
839 tlog.Debug(tag, $"ApplicationAppControl END (OK)");
844 [Description("Application MemoryLow.")]
845 [Property("SPEC", "Tizen.NUI.Application.MemoryLow A")]
846 [Property("SPEC_URL", "-")]
847 [Property("CRITERIA", "PRW")]
848 [Property("AUTHOR", "guowei.wang@samsung.com")]
849 public void ApplicationMemoryLow()
851 tlog.Debug(tag, $"ApplicationMemoryLow START");
855 Application.Instance.MemoryLow += MyOnMemoryLow;
856 Application.Instance.MemoryLow -= MyOnMemoryLow;
860 tlog.Debug(tag, e.Message.ToString());
861 Assert.Fail("Caught Exception: Failed!");
864 tlog.Debug(tag, $"ApplicationMemoryLow END (OK)");
869 [Description("Application BatteryLow.")]
870 [Property("SPEC", "Tizen.NUI.Application.BatteryLow A")]
871 [Property("SPEC_URL", "-")]
872 [Property("CRITERIA", "PRW")]
873 [Property("AUTHOR", "guowei.wang@samsung.com")]
874 public void ApplicationBatteryLow()
876 tlog.Debug(tag, $"ApplicationBatteryLow START");
880 Application.Instance.BatteryLow += MyOnBatteryLow;
881 Application.Instance.BatteryLow -= MyOnBatteryLow;
885 tlog.Debug(tag, e.Message.ToString());
886 Assert.Fail("Caught Exception: Failed!");
889 tlog.Debug(tag, $"ApplicationBatteryLow END (OK)");
894 [Description("Application RegionChanged.")]
895 [Property("SPEC", "Tizen.NUI.Application.RegionChanged A")]
896 [Property("SPEC_URL", "-")]
897 [Property("CRITERIA", "PRW")]
898 [Property("AUTHOR", "guowei.wang@samsung.com")]
899 public void ApplicationRegionChanged()
901 tlog.Debug(tag, $"ApplicationRegionChanged START");
905 Application.Instance.RegionChanged += MyOnRegionChanged;
906 Application.Instance.RegionChanged -= MyOnRegionChanged;
910 tlog.Debug(tag, e.Message.ToString());
911 Assert.Fail("Caught Exception: Failed!");
914 tlog.Debug(tag, $"ApplicationRegionChanged END (OK)");
919 [Description("Application Terminating.")]
920 [Property("SPEC", "Tizen.NUI.Application.Terminating A")]
921 [Property("SPEC_URL", "-")]
922 [Property("CRITERIA", "PRW")]
923 [Property("AUTHOR", "guowei.wang@samsung.com")]
924 public void ApplicationTerminating()
926 tlog.Debug(tag, $"ApplicationTerminating START");
930 Application.Instance.Terminating += MyOnTerminating;
931 Application.Instance.Terminating -= MyOnTerminating;
935 tlog.Debug(tag, e.Message.ToString());
936 Assert.Fail("Caught Exception: Failed!");
939 tlog.Debug(tag, $"ApplicationTerminating END (OK)");
944 [Description("Application Initialized.")]
945 [Property("SPEC", "Tizen.NUI.Application.Initialized A")]
946 [Property("SPEC_URL", "-")]
947 [Property("CRITERIA", "PRW")]
948 [Property("AUTHOR", "guowei.wang@samsung.com")]
949 public void ApplicationInitialized()
951 tlog.Debug(tag, $"ApplicationInitialized START");
955 Application.Instance.Initialized += MyOnInitialized;
956 Application.Instance.Initialized -= MyOnInitialized;
960 tlog.Debug(tag, e.Message.ToString());
961 Assert.Fail("Caught Exception: Failed!");
964 tlog.Debug(tag, $"ApplicationInitialized END (OK)");
967 private void MyOnPaused(object sender, NUIApplicationPausedEventArgs e) { }
968 private void MyOnResumed(object sender, NUIApplicationResumedEventArgs e) { }
969 private void MyOnReset(object sender, NUIApplicationResetEventArgs e) { }
970 private void MyOnLanguageChanged(object sender, NUIApplicationLanguageChangedEventArgs e) { }
971 private void MyOnAppControl(object sender, NUIApplicationAppControlEventArgs e) { }
972 private void MyOnMemoryLow(object sender, NUIApplicationMemoryLowEventArgs e) { }
973 private void MyOnBatteryLow(object sender, NUIApplicationBatteryLowEventArgs e) { }
974 private void MyOnRegionChanged(object sender, NUIApplicationRegionChangedEventArgs e) { }
975 private void MyOnTerminating(object sender, NUIApplicationTerminatingEventArgs e) { }
976 private void MyOnInitialized(object sender, NUIApplicationInitEventArgs e) { }
980 [Description("Application Dispose.")]
981 [Property("SPEC", "Tizen.NUI.Application.Dispose M")]
982 [Property("SPEC_URL", "-")]
983 [Property("CRITERIA", "MR")]
984 [Property("AUTHOR", "guowei.wang@samsung.com")]
985 public void ApplicationDispose()
987 tlog.Debug(tag, $"ApplicationDispose START");
991 var testingTarget = new MyApplication(Application.Instance.SwigCPtr.Handle, false);
993 tlog.Debug(tag, "testingTarget : " + testingTarget);
995 testingTarget.Initialized += MyOnInitialized;
996 testingTarget.Terminating += MyOnTerminating;
997 testingTarget.Paused += MyOnPaused;
998 testingTarget.Resumed += MyOnResumed;
999 testingTarget.Reset += MyOnReset;
1000 testingTarget.LanguageChanged += MyOnLanguageChanged;
1001 testingTarget.RegionChanged += MyOnRegionChanged;
1002 testingTarget.BatteryLow += MyOnBatteryLow;
1003 testingTarget.MemoryLow += MyOnMemoryLow;
1004 testingTarget.AppControl += MyOnAppControl;
1006 testingTarget.OnDispose(DisposeTypes.Explicit);
1010 tlog.Debug(tag, e.Message.ToString());
1011 Assert.Fail("Caught Exception: Failed!");
1014 tlog.Debug(tag, $"ApplicationDispose END (OK)");
1019 [Description("Application SetCurrentApplication")]
1020 [Property("SPEC", "Tizen.NUI.Application.SetCurrentApplication M")]
1021 [Property("SPEC_URL", "-")]
1022 [Property("CRITERIA", "MR")]
1023 [Property("AUTHOR", "guowei.wang@samsung.com")]
1024 public void ApplicationSetCurrentApplication()
1026 tlog.Debug(tag, $"ApplicationSetCurrentApplication START");
1030 Widget widget = new Widget();
1031 WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
1032 Application.SetCurrentApplication(application);
1034 tlog.Debug(tag, "Application.Current : " + Application.Current);
1041 tlog.Debug(tag, e.Message.ToString());
1042 Assert.Fail("Caught Exception: Failed!");
1045 tlog.Debug(tag, $"ApplicationSetCurrentApplication END (OK)");
1050 [Description("Application Current. With existing application.")]
1051 [Property("SPEC", "Tizen.NUI.Application.Current A")]
1052 [Property("SPEC_URL", "-")]
1053 [Property("CRITERIA", "PRO")]
1054 [Property("AUTHOR", "guowei.wang@samsung.com")]
1055 public void ApplicationCurrentSetWithExistingApplication()
1057 tlog.Debug(tag, $"ApplicationCurrentSetWithExistingApplication START");
1059 Widget widget = new Widget();
1060 WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
1061 Application.SetCurrentApplication(application);
1065 Application.Current = application;
1069 tlog.Debug(tag, e.Message.ToString());
1070 Assert.Fail("Caught Exception: Failed!");
1076 tlog.Debug(tag, $"ApplicationCurrentSetWithExistingApplication END (OK)");
1081 [Description("Application XamlResources.")]
1082 [Property("SPEC", "Tizen.NUI.Application.XamlResources A")]
1083 [Property("SPEC_URL", "-")]
1084 [Property("CRITERIA", "PRW")]
1085 [Property("AUTHOR", "guowei.wang@samsung.com")]
1086 public void ApplicationXamlResources()
1088 tlog.Debug(tag, $"ApplicationXamlResources START");
1090 Widget widget = new Widget();
1091 var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1093 tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
1095 application.XamlResources = new Tizen.NUI.Binding.ResourceDictionary();
1096 tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
1100 tlog.Debug(tag, $"ApplicationXamlResources END (OK)");
1105 [Description("Application IsApplicationOrNull.")]
1106 [Property("SPEC", "Tizen.NUI.Application.IsApplicationOrNull M")]
1107 [Property("SPEC_URL", "-")]
1108 [Property("CRITERIA", "MR")]
1109 [Property("AUTHOR", "guowei.wang@samsung.com")]
1110 public void ApplicationIsApplicationOrNull()
1112 tlog.Debug(tag, $"ApplicationIsApplicationOrNull START");
1114 Widget widget = new Widget();
1115 var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1119 var result = Application.IsApplicationOrNull(application);
1120 Assert.IsTrue(result);
1121 tlog.Debug(tag, "result = " + result);
1125 tlog.Debug(tag, e.Message.ToString());
1126 Assert.Fail("Caught Exception: Failed!");
1131 tlog.Debug(tag, $"ApplicationIsApplicationOrNull END (OK)");
1136 [Description("Application ResetSignal.")]
1137 [Property("SPEC", "Tizen.NUI.Application.ResetSignal M")]
1138 [Property("SPEC_URL", "-")]
1139 [Property("CRITERIA", "MR")]
1140 [Property("AUTHOR", "guowei.wang@samsung.com")]
1141 public void ApplicationResetSignal()
1143 tlog.Debug(tag, $"ApplicationResetSignal START");
1145 Widget widget = new Widget();
1146 var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1148 application.InitSignal();
1152 application.ResetSignal();
1156 tlog.Debug(tag, e.Message.ToString());
1157 Assert.Fail("Caught Exception: Failed!");
1162 tlog.Debug(tag, $"ApplicationResetSignal END (OK)");
1167 [Description("Application GetResourcePath.")]
1168 [Property("SPEC", "Tizen.NUI.Application.GetResourcePath M")]
1169 [Property("SPEC_URL", "-")]
1170 [Property("CRITERIA", "MR")]
1171 [Property("AUTHOR", "guowei.wang@samsung.com")]
1172 public void ApplicationGetResourcePath()
1174 tlog.Debug(tag, $"ApplicationGetResourcePath START");
1178 Application.GetResourcePath();
1179 tlog.Debug(tag, "ResourcePath : " + Application.GetResourcePath());
1183 tlog.Debug(tag, e.Message.ToString());
1184 Assert.Fail("Caught Exception: Failed!");
1187 tlog.Debug(tag, $"ApplicationGetResourcePath END (OK)");
1192 [Description("Application GetLanguage.")]
1193 [Property("SPEC", "Tizen.NUI.Application.GetLanguage M")]
1194 [Property("SPEC_URL", "-")]
1195 [Property("CRITERIA", "MR")]
1196 [Property("AUTHOR", "guowei.wang@samsung.com")]
1197 public void ApplicationGetLanguage()
1199 tlog.Debug(tag, $"ApplicationGetLanguage START");
1203 Application.Instance.GetLanguage();
1204 tlog.Debug(tag, "Language : " + Application.Instance.GetLanguage());
1208 tlog.Debug(tag, e.Message.ToString());
1209 Assert.Fail("Caught Exception: Failed!");
1212 tlog.Debug(tag, $"ApplicationGetLanguage END (OK)");
1217 [Description("Application GetRegion.")]
1218 [Property("SPEC", "Tizen.NUI.Application.GetRegion M")]
1219 [Property("SPEC_URL", "-")]
1220 [Property("CRITERIA", "MR")]
1221 [Property("AUTHOR", "guowei.wang@samsung.com")]
1222 public void ApplicationGetRegion()
1224 tlog.Debug(tag, $"ApplicationGetRegion START");
1228 Application.Instance.GetRegion();
1229 tlog.Debug(tag, "Region : " + Application.Instance.GetRegion());
1233 tlog.Debug(tag, e.Message.ToString());
1234 Assert.Fail("Caught Exception: Failed!");
1237 tlog.Debug(tag, $"ApplicationGetRegion END (OK)");
1242 [Description("Application GetWindow.")]
1243 [Property("SPEC", "Tizen.NUI.Application.GetWindow M")]
1244 [Property("SPEC_URL", "-")]
1245 [Property("CRITERIA", "MR")]
1246 [Property("AUTHOR", "guowei.wang@samsung.com")]
1247 public void ApplicationGetWindow()
1249 tlog.Debug(tag, $"ApplicationGetWindow START");
1253 Application.Instance.GetWindow();
1254 tlog.Debug(tag, "Region : " + Application.Instance.GetWindow());
1258 tlog.Debug(tag, e.Message.ToString());
1259 Assert.Fail("Caught Exception: Failed!");
1262 tlog.Debug(tag, $"ApplicationGetWindow END (OK)");
1267 [Description("Application AddIdle.")]
1268 [Property("SPEC", "Tizen.NUI.Application.AddIdle M")]
1269 [Property("SPEC_URL", "-")]
1270 [Property("CRITERIA", "MR")]
1271 [Property("AUTHOR", "guowei.wang@samsung.com")]
1272 public void ApplicationAddIdle()
1274 tlog.Debug(tag, $"ApplicationAddIdle START");
1278 SWIGTYPE_p_Dali__CallbackBase callback = new SWIGTYPE_p_Dali__CallbackBase(new ImageView().SwigCPtr.Handle);
1279 var result = Application.Instance.AddIdle(callback);
1280 tlog.Debug(tag, "result : " + result);
1284 tlog.Debug(tag, e.Message.ToString());
1285 Assert.Fail("Caught Exception: Failed!");
1288 tlog.Debug(tag, $"ApplicationAddIdle END (OK)");
1293 [Description("Application Lower.")]
1294 [Property("SPEC", "Tizen.NUI.Application.Lower M")]
1295 [Property("SPEC_URL", "-")]
1296 [Property("CRITERIA", "MR")]
1297 [Property("AUTHOR", "guowei.wang@samsung.com")]
1298 public void ApplicationLower()
1300 tlog.Debug(tag, $"ApplicationLower START");
1304 Application.Instance.Lower();
1308 tlog.Debug(tag, e.Message.ToString());
1309 Assert.Fail("Caught Exception: Failed!");
1312 tlog.Debug(tag, $"ApplicationLower END (OK)");
1317 [Description("Application Assign.")]
1318 [Property("SPEC", "Tizen.NUI.Application.Assign M")]
1319 [Property("SPEC_URL", "-")]
1320 [Property("CRITERIA", "MR")]
1321 [Property("AUTHOR", "guowei.wang@samsung.com")]
1322 public void ApplicationAssign()
1324 tlog.Debug(tag, $"ApplicationAssign START");
1326 Widget widget = new Widget();
1327 var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1331 var testingTarget = Application.Instance.Assign(application);
1332 Assert.IsNotNull(testingTarget, "should be not null");
1333 Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
1337 tlog.Debug(tag, e.Message.ToString());
1338 Assert.Fail("Caught Exception: Failed!");
1343 tlog.Debug(tag, $"ApplicationAssign END (OK)");
1348 [Description("Application GetWindowList.")]
1349 [Property("SPEC", "Tizen.NUI.Application.GetWindowList M")]
1350 [Property("SPEC_URL", "-")]
1351 [Property("CRITERIA", "MR")]
1352 [Property("AUTHOR", "guowei.wang@samsung.com")]
1353 public void ApplicationGetWindowList()
1355 tlog.Debug(tag, $"ApplicationGetWindowList START");
1359 Application.GetWindowList();
1363 tlog.Debug(tag, e.Message.ToString());
1364 Assert.Fail("Caught Exception: Failed!");
1367 tlog.Debug(tag, $"ApplicationGetWindowList END (OK)");