Merge remote-tracking branch 'origin/master' into tizen
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Application / TSApplication.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using Tizen.NUI.Binding;
7
8 namespace Tizen.NUI.Devel.Tests
9 {
10     using tlog = Tizen.Log;
11
12     [TestFixture]
13     [Description("internal/Application/Application")]
14     public class InternalApplicationTest
15     {
16         private const string tag = "NUITEST";
17
18         private delegate bool dummyCallback(IntPtr application);
19         private bool OnDummyCallback(IntPtr data)
20         {
21             return false;
22         }
23
24         internal class MyApplication : Application
25         {
26             public MyApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
27             { }
28
29             public void OnDispose(DisposeTypes type)
30             {
31                 base.Dispose(type);
32             }
33         }
34
35         [SetUp]
36         public void Init()
37         {
38             tlog.Info(tag, "Init() is called!");
39         }
40
41         [TearDown]
42         public void Destroy()
43         {
44             tlog.Info(tag, "Destroy() is called!");
45         }
46
47         [Test]
48         [Category("P1")]
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()
55         {
56             tlog.Debug(tag, $"NUIApplicationInitEventArgsGet START");
57
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!");
61
62             var result = testingTarget.Application;
63             Assert.IsNull(result);
64
65             tlog.Debug(tag, $"NUIApplicationInitEventArgsGet END (OK)");
66         }
67
68         [Test]
69         [Category("P1")]
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()
76         {
77             tlog.Debug(tag, $"NUIApplicationInitEventArgsSet START");
78
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!");
82
83             var g_result = testingTarget.Application;
84             Assert.IsNull(g_result);
85
86             testingTarget.Application = Application.Current;
87             var s_result = testingTarget.Application;
88             Assert.IsNotNull(s_result);
89
90             tlog.Debug(tag, $"NUIApplicationInitEventArgsSet END (OK)");
91         }
92
93         [Test]
94         [Category("P1")]
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()
101         {
102             tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsGet START");
103
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!");
107
108             var result = testingTarget.Application;
109             Assert.IsNull(result);
110
111             tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsGet END (OK)");
112         }
113
114         [Test]
115         [Category("P1")]
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()
122         {
123             tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsSet START");
124
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!");
128
129             var g_result = testingTarget.Application;
130             Assert.IsNull(g_result);
131
132             testingTarget.Application = Application.Current;
133             var s_result = testingTarget.Application;
134             Assert.IsNotNull(s_result);
135
136             tlog.Debug(tag, $"NUIApplicationTerminatingEventArgsSet END (OK)");
137         }
138
139         [Test]
140         [Category("P1")]
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()
147         {
148             tlog.Debug(tag, $"NUIApplicationPausedEventArgsGet START");
149
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!");
153
154             var result = testingTarget.Application;
155             Assert.IsNull(result);
156
157             tlog.Debug(tag, $"NUIApplicationPausedEventArgsGet END (OK)");
158         }
159
160         [Test]
161         [Category("P1")]
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()
168         {
169             tlog.Debug(tag, $"NUIApplicationPausedEventArgsSet START");
170
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!");
174
175             var g_result = testingTarget.Application;
176             Assert.IsNull(g_result);
177
178             testingTarget.Application = Application.Current;
179             var s_result = testingTarget.Application;
180             Assert.IsNotNull(s_result);
181
182             tlog.Debug(tag, $"NUIApplicationPausedEventArgsSet END (OK)");
183         }
184
185         [Test]
186         [Category("P1")]
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()
193         {
194             tlog.Debug(tag, $"NUIApplicationResumedEventArgsGet START");
195
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!");
199
200             var result = testingTarget.Application;
201             Assert.IsNull(result);
202
203             tlog.Debug(tag, $"NUIApplicationResumedEventArgsGet END (OK)");
204         }
205
206         [Test]
207         [Category("P1")]
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()
214         {
215             tlog.Debug(tag, $"NUIApplicationResumedEventArgsSet START");
216
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!");
220
221             var g_result = testingTarget.Application;
222             Assert.IsNull(g_result);
223
224             testingTarget.Application = Application.Current;
225             var s_result = testingTarget.Application;
226             Assert.IsNotNull(s_result);
227
228             tlog.Debug(tag, $"NUIApplicationResumedEventArgsSet END (OK)");
229         }
230
231         [Test]
232         [Category("P1")]
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()
239         {
240             tlog.Debug(tag, $"NUIApplicationResetEventArgsGet START");
241
242             var testingTarget = new NUIApplicationResetEventArgs();
243             Assert.IsNotNull(testingTarget);
244             Assert.IsInstanceOf<NUIApplicationResetEventArgs>(testingTarget, "should be an instance of testing target class!");
245
246             var result = testingTarget.Application;
247             Assert.IsNull(result);
248
249             tlog.Debug(tag, $"NUIApplicationResetEventArgsGet END (OK)");
250         }
251
252         [Test]
253         [Category("P1")]
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()
260         {
261             tlog.Debug(tag, $"NUIApplicationResetEventArgsSet START");
262
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!");
266
267             var g_result = testingTarget.Application;
268             Assert.IsNull(g_result);
269
270             testingTarget.Application = Application.Current;
271             var s_result = testingTarget.Application;
272             Assert.IsNotNull(s_result);
273
274             tlog.Debug(tag, $"NUIApplicationResetEventArgsSet END (OK)");
275         }
276
277         [Test]
278         [Category("P1")]
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()
285         {
286             tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsGet START");
287
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!");
291
292             var result = testingTarget.Application;
293             Assert.IsNull(result);
294
295             tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsGet END (OK)");
296         }
297
298         [Test]
299         [Category("P1")]
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()
306         {
307             tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsSet START");
308
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!");
312
313             var g_result = testingTarget.Application;
314             Assert.IsNull(g_result);
315
316             testingTarget.Application = Application.Current;
317             var s_result = testingTarget.Application;
318             Assert.IsNotNull(s_result);
319
320             tlog.Debug(tag, $"NUIApplicationLanguageChangedEventArgsSet END (OK)");
321         }
322
323         [Test]
324         [Category("P1")]
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()
331         {
332             tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsGet START");
333
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!");
337
338             var result = testingTarget.Application;
339             Assert.IsNull(result);
340
341             tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsGet END (OK)");
342         }
343
344         [Test]
345         [Category("P1")]
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()
352         {
353             tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsSet START");
354
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!");
358
359             var g_result = testingTarget.Application;
360             Assert.IsNull(g_result);
361
362             testingTarget.Application = Application.Current;
363             var s_result = testingTarget.Application;
364             Assert.IsNotNull(s_result);
365
366             tlog.Debug(tag, $"NUIApplicationRegionChangedEventArgsSet END (OK)");
367         }
368
369         [Test]
370         [Category("P1")]
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()
377         {
378             tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusGet START");
379
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!");
383
384             var result = testingTarget.BatteryStatus;
385             Assert.IsNotNull(result, "should be not null");
386
387             tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusGet END (OK)");
388         }
389
390         [Test]
391         [Category("P1")]
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()
398         {
399             tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusSet START");
400
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!");
404
405             var status = Application.BatteryStatus.Normal;
406             testingTarget.BatteryStatus = status;
407
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.");
411
412             tlog.Debug(tag, $"NUIApplicationBatteryLowEventArgsBatteryStatusSet END (OK)");
413         }
414
415         [Test]
416         [Category("P1")]
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()
423         {
424             tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusGet START");
425
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!");
429
430             var result = testingTarget.MemoryStatus;
431             Assert.IsNotNull(result, "should be not null");
432
433             tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusGet END (OK)");
434         }
435
436         [Test]
437         [Category("P1")]
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()
444         {
445             tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusSet START");
446
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!");
450
451             var status = Application.MemoryStatus.Normal;
452             testingTarget.MemoryStatus = status;
453
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.");
457
458             tlog.Debug(tag, $"NUIApplicationMemoryLowEventArgsMemoryStatusSet END (OK)");
459         }
460
461         [Test]
462         [Category("P1")]
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()
469         {
470             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationGet START");
471
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!");
475
476             var result = testingTarget.Application;
477             Assert.IsNull(result, "should be null");
478
479             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationGet END (OK)");
480         }
481
482         [Test]
483         [Category("P1")]
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()
490         {
491             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationSet START");
492
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!");
496
497             var g_result = testingTarget.Application;
498             Assert.IsNull(g_result);
499
500             testingTarget.Application = Application.Current;
501             var s_result = testingTarget.Application;
502             Assert.IsNotNull(s_result);
503
504             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsApplicationSet END (OK)");
505         }
506
507         [Test]
508         [Category("P1")]
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()
515         {
516             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPGet START");
517
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!");
521
522             var result = testingTarget.VoidP;
523             Assert.IsNotNull(result, "should be not null");
524
525             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPGet END (OK)");
526         }
527
528         [Test]
529         [Category("P1")]
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()
536         {
537             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPSet START");
538
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!");
543
544             testingTarget.VoidP = dummy;
545
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.");
549
550             tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPSet END (OK)");
551         }
552
553         [Test]
554         [Category("P1")]
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()
561         {
562             tlog.Debug(tag, $"GetResourcesProviderIResourcesProviderGet START");
563
564             try
565             {
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!");
569             }
570             catch (Exception e)
571             {
572                 tlog.Debug(tag, e.Message.ToString());
573                 Assert.Fail("Caught Exception: Failed!");
574             }
575
576             tlog.Debug(tag, $"GetResourcesProviderIResourcesProviderGet END (OK)");
577         }
578
579         [Test]
580         [Category("P1")]
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()
587         {
588             tlog.Debug(tag, $"ApplicationConstructor START");
589
590             Widget widget = new Widget();
591             var application = new WidgetApplication(widget.GetIntPtr(), false);
592
593             try
594             {
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!");
598
599                 testingTarget.Dispose();
600             }
601             catch (Exception e)
602             {
603                 tlog.Debug(tag, e.Message.ToString());
604                 Assert.Fail("Caught Exception: Failed!");
605             }
606
607             widget.Dispose();
608             widget = null;
609             tlog.Debug(tag, $"ApplicationConstructor END (OK)");
610         }
611
612         [Test]
613         [Category("P1")]
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()
620         {
621             tlog.Debug(tag, $"ApplicationGetApplicationFromPtr START");
622
623             Widget widget = new Widget();
624             var application = new WidgetApplication(widget.GetIntPtr(), false);
625             
626             try
627             {
628                 Application.GetApplicationFromPtr(application.SwigCPtr.Handle);
629             }
630             catch (Exception e)
631             {
632                 tlog.Debug(tag, e.Message.ToString());
633                 Assert.Fail("Caught Exception: Failed!");
634             }
635
636             widget.Dispose();
637             widget = null;
638             tlog.Debug(tag, $"ApplicationGetApplicationFromPtr END (OK)");
639         }
640
641         [Test]
642         [Category("P1")]
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()
649         {
650             tlog.Debug(tag, $"ApplicationSystemResources START");
651
652             try
653             {
654                 var result = Application.Instance.SystemResources;
655                 tlog.Debug(tag, "SystemResources : " + result);
656             }
657             catch (Exception e)
658             {
659                 tlog.Debug(tag, e.Message.ToString());
660                 Assert.Fail("Caught Exception: Failed!");
661             }
662
663             tlog.Debug(tag, $"ApplicationSystemResources END (OK)");
664         }
665
666         [Test]
667         [Category("P1")]
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()
674         {
675             tlog.Debug(tag, $"ApplicationIsResourcesCreated START");
676
677             try
678             {
679                 var result = Application.Instance.IsResourcesCreated;
680                 tlog.Debug(tag, "IsResourcesCreated : " + result);
681             }
682             catch (Exception e)
683             {
684                 tlog.Debug(tag, e.Message.ToString());
685                 Assert.Fail("Caught Exception: Failed!");
686             }
687
688             tlog.Debug(tag, $"ApplicationIsResourcesCreated END (OK)");
689         }
690
691         [Test]
692         [Category("P1")]
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()
699         {
700             tlog.Debug(tag, $"ApplicationAddResourceChangedCallback START");
701
702             try
703             {
704                 Application.AddResourceChangedCallback(new ImageView() as object, AddResourceChangedCallback);      
705             }
706             catch (Exception e)
707             {
708                 tlog.Debug(tag, e.Message.ToString());
709                 Assert.Fail("Caught Exception: Failed!");
710             }
711
712             tlog.Debug(tag, $"ApplicationAddResourceChangedCallback END (OK)");
713         }
714
715         private void AddResourceChangedCallback(object sender, ResourcesChangedEventArgs e) { }
716
717         [Test]
718         [Category("P1")]
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()
725         {
726             tlog.Debug(tag, $"ApplicationPaused START");
727
728             try
729             {
730                 Application.Instance.Paused += MyOnPaused;
731                 Application.Instance.Paused -= MyOnPaused;
732             }
733             catch (Exception e)
734             {
735                 tlog.Debug(tag, e.Message.ToString());
736                 Assert.Fail("Caught Exception: Failed!");
737             }
738
739             tlog.Debug(tag, $"ApplicationPaused END (OK)");
740         }
741
742         [Test]
743         [Category("P1")]
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()
750         {
751             tlog.Debug(tag, $"ApplicationResumed START");
752
753             try
754             {
755                 Application.Instance.Resumed += MyOnResumed;
756                 Application.Instance.Resumed -= MyOnResumed;
757             }
758             catch (Exception e)
759             {
760                 tlog.Debug(tag, e.Message.ToString());
761                 Assert.Fail("Caught Exception: Failed!");
762             }
763
764             tlog.Debug(tag, $"ApplicationResumed END (OK)");
765         }
766
767         [Test]
768         [Category("P1")]
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()
775         {
776             tlog.Debug(tag, $"ApplicationReset START");
777
778             try
779             {
780                 Application.Instance.Reset += MyOnReset;
781                 Application.Instance.Reset -= MyOnReset;
782             }
783             catch (Exception e)
784             {
785                 tlog.Debug(tag, e.Message.ToString());
786                 Assert.Fail("Caught Exception: Failed!");
787             }
788
789             tlog.Debug(tag, $"ApplicationReset END (OK)");
790         }
791
792         [Test]
793         [Category("P1")]
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()
800         {
801             tlog.Debug(tag, $"ApplicationLanguageChanged START");
802
803             try
804             {
805                 Application.Instance.LanguageChanged += MyOnLanguageChanged;
806                 Application.Instance.LanguageChanged -= MyOnLanguageChanged;
807             }
808             catch (Exception e)
809             {
810                 tlog.Debug(tag, e.Message.ToString());
811                 Assert.Fail("Caught Exception: Failed!");
812             }
813
814             tlog.Debug(tag, $"ApplicationLanguageChanged END (OK)");
815         }
816
817         [Test]
818         [Category("P1")]
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()
825         {
826             tlog.Debug(tag, $"ApplicationAppControl START");
827
828             try
829             {
830                 Application.Instance.AppControl += MyOnAppControl;
831                 Application.Instance.AppControl -= MyOnAppControl;
832             }
833             catch (Exception e)
834             {
835                 tlog.Debug(tag, e.Message.ToString());
836                 Assert.Fail("Caught Exception: Failed!");
837             }
838
839             tlog.Debug(tag, $"ApplicationAppControl END (OK)");
840         }
841
842         [Test]
843         [Category("P1")]
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()
850         {
851             tlog.Debug(tag, $"ApplicationMemoryLow START");
852
853             try
854             {
855                 Application.Instance.MemoryLow += MyOnMemoryLow;
856                 Application.Instance.MemoryLow -= MyOnMemoryLow;
857             }
858             catch (Exception e)
859             {
860                 tlog.Debug(tag, e.Message.ToString());
861                 Assert.Fail("Caught Exception: Failed!");
862             }
863
864             tlog.Debug(tag, $"ApplicationMemoryLow END (OK)");
865         }
866
867         [Test]
868         [Category("P1")]
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()
875         {
876             tlog.Debug(tag, $"ApplicationBatteryLow START");
877
878             try
879             {
880                 Application.Instance.BatteryLow += MyOnBatteryLow;
881                 Application.Instance.BatteryLow -= MyOnBatteryLow;
882             }
883             catch (Exception e)
884             {
885                 tlog.Debug(tag, e.Message.ToString());
886                 Assert.Fail("Caught Exception: Failed!");
887             }
888
889             tlog.Debug(tag, $"ApplicationBatteryLow END (OK)");
890         }
891
892         [Test]
893         [Category("P1")]
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()
900         {
901             tlog.Debug(tag, $"ApplicationRegionChanged START");
902
903             try
904             {
905                 Application.Instance.RegionChanged += MyOnRegionChanged;
906                 Application.Instance.RegionChanged -= MyOnRegionChanged;
907             }
908             catch (Exception e)
909             {
910                 tlog.Debug(tag, e.Message.ToString());
911                 Assert.Fail("Caught Exception: Failed!");
912             }
913
914             tlog.Debug(tag, $"ApplicationRegionChanged END (OK)");
915         }
916
917         [Test]
918         [Category("P1")]
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()
925         {
926             tlog.Debug(tag, $"ApplicationTerminating START");
927
928             try
929             {
930                 Application.Instance.Terminating += MyOnTerminating;
931                 Application.Instance.Terminating -= MyOnTerminating;
932             }
933             catch (Exception e)
934             {
935                 tlog.Debug(tag, e.Message.ToString());
936                 Assert.Fail("Caught Exception: Failed!");
937             }
938
939             tlog.Debug(tag, $"ApplicationTerminating END (OK)");
940         }
941
942         [Test]
943         [Category("P1")]
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()
950         {
951             tlog.Debug(tag, $"ApplicationInitialized START");
952
953             try
954             {
955                 Application.Instance.Initialized += MyOnInitialized;
956                 Application.Instance.Initialized -= MyOnInitialized;
957             }
958             catch (Exception e)
959             {
960                 tlog.Debug(tag, e.Message.ToString());
961                 Assert.Fail("Caught Exception: Failed!");
962             }
963
964             tlog.Debug(tag, $"ApplicationInitialized END (OK)");
965         }
966
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) { }
977
978         [Test]
979         [Category("P1")]
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()
986         {
987             tlog.Debug(tag, $"ApplicationDispose START");
988
989             try
990             {
991                 var testingTarget = new MyApplication(Application.Instance.SwigCPtr.Handle, false);
992
993                 tlog.Debug(tag, "testingTarget : " + testingTarget);
994
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;
1005
1006                 testingTarget.OnDispose(DisposeTypes.Explicit);
1007             }
1008             catch (Exception e)
1009             {
1010                 tlog.Debug(tag, e.Message.ToString());
1011                 Assert.Fail("Caught Exception: Failed!");
1012             }
1013
1014             tlog.Debug(tag, $"ApplicationDispose END (OK)");
1015         }
1016
1017         [Test]
1018         [Category("P1")]
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()
1025         {
1026             tlog.Debug(tag, $"ApplicationSetCurrentApplication START");
1027
1028             try
1029             {
1030                 Widget widget = new Widget();
1031                 WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
1032                 Application.SetCurrentApplication(application);
1033
1034                 tlog.Debug(tag, "Application.Current : " + Application.Current);
1035
1036                 widget.Dispose();
1037                 widget = null;
1038             }
1039             catch (Exception e)
1040             {
1041                 tlog.Debug(tag, e.Message.ToString());
1042                 Assert.Fail("Caught Exception: Failed!");
1043             }
1044
1045             tlog.Debug(tag, $"ApplicationSetCurrentApplication END (OK)");
1046         }
1047
1048         [Test]
1049         [Category("P2")]
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()
1056         {
1057             tlog.Debug(tag, $"ApplicationCurrentSetWithExistingApplication START");
1058
1059             Widget widget = new Widget();
1060             WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
1061             Application.SetCurrentApplication(application);
1062
1063             try
1064             {
1065                 Application.Current = application;
1066             }
1067             catch (Exception e)
1068             {
1069                 tlog.Debug(tag, e.Message.ToString());
1070                 Assert.Fail("Caught Exception: Failed!");
1071             }
1072
1073             widget.Dispose();
1074             widget = null;
1075
1076             tlog.Debug(tag, $"ApplicationCurrentSetWithExistingApplication END (OK)");
1077         }
1078
1079         [Test]
1080         [Category("P1")]
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()
1087         {
1088             tlog.Debug(tag, $"ApplicationXamlResources START");
1089
1090             Widget widget = new Widget();
1091             var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1092
1093             tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
1094
1095             application.XamlResources = new Tizen.NUI.Binding.ResourceDictionary();
1096             tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
1097
1098             widget.Dispose();
1099             widget = null;
1100             tlog.Debug(tag, $"ApplicationXamlResources END (OK)");
1101         }
1102
1103         [Test]
1104         [Category("P1")]
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()
1111         {
1112             tlog.Debug(tag, $"ApplicationIsApplicationOrNull START");
1113
1114             Widget widget = new Widget();
1115             var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1116
1117             try
1118             {
1119                 var result = Application.IsApplicationOrNull(application);
1120                 Assert.IsTrue(result);
1121                 tlog.Debug(tag, "result = " + result);
1122             }
1123             catch (Exception e)
1124             {
1125                 tlog.Debug(tag, e.Message.ToString());
1126                 Assert.Fail("Caught Exception: Failed!");
1127             }
1128
1129             widget.Dispose();
1130             widget = null;
1131             tlog.Debug(tag, $"ApplicationIsApplicationOrNull END (OK)");
1132         }
1133
1134         [Test]
1135         [Category("P1")]
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()
1142         {
1143             tlog.Debug(tag, $"ApplicationResetSignal START");
1144
1145             Widget widget = new Widget();
1146             var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1147
1148             application.InitSignal();
1149
1150             try
1151             {
1152                 application.ResetSignal();
1153             }
1154             catch (Exception e)
1155             {
1156                 tlog.Debug(tag, e.Message.ToString());
1157                 Assert.Fail("Caught Exception: Failed!");
1158             }
1159
1160             widget.Dispose();
1161             widget = null;
1162             tlog.Debug(tag, $"ApplicationResetSignal END (OK)");
1163         }
1164
1165         [Test]
1166         [Category("P1")]
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()
1173         {
1174             tlog.Debug(tag, $"ApplicationGetResourcePath START");
1175
1176             try
1177             {
1178                 Application.GetResourcePath();
1179                 tlog.Debug(tag, "ResourcePath : " + Application.GetResourcePath());
1180             }
1181             catch (Exception e)
1182             {
1183                 tlog.Debug(tag, e.Message.ToString());
1184                 Assert.Fail("Caught Exception: Failed!");
1185             }
1186
1187             tlog.Debug(tag, $"ApplicationGetResourcePath END (OK)");
1188         }
1189
1190         [Test]
1191         [Category("P1")]
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()
1198         {
1199             tlog.Debug(tag, $"ApplicationGetLanguage START");
1200
1201             try
1202             {
1203                 Application.Instance.GetLanguage();
1204                 tlog.Debug(tag, "Language : " + Application.Instance.GetLanguage());
1205             }
1206             catch (Exception e)
1207             {
1208                 tlog.Debug(tag, e.Message.ToString());
1209                 Assert.Fail("Caught Exception: Failed!");
1210             }
1211
1212             tlog.Debug(tag, $"ApplicationGetLanguage END (OK)");
1213         }
1214
1215         [Test]
1216         [Category("P1")]
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()
1223         {
1224             tlog.Debug(tag, $"ApplicationGetRegion START");
1225
1226             try
1227             {
1228                 Application.Instance.GetRegion();
1229                 tlog.Debug(tag, "Region : " + Application.Instance.GetRegion());
1230             }
1231             catch (Exception e)
1232             {
1233                 tlog.Debug(tag, e.Message.ToString());
1234                 Assert.Fail("Caught Exception: Failed!");
1235             }
1236
1237             tlog.Debug(tag, $"ApplicationGetRegion END (OK)");
1238         }
1239
1240         [Test]
1241         [Category("P1")]
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()
1248         {
1249             tlog.Debug(tag, $"ApplicationGetWindow START");
1250
1251             try
1252             {
1253                 Application.Instance.GetWindow();
1254                 tlog.Debug(tag, "Region : " + Application.Instance.GetWindow());
1255             }
1256             catch (Exception e)
1257             {
1258                 tlog.Debug(tag, e.Message.ToString());
1259                 Assert.Fail("Caught Exception: Failed!");
1260             }
1261
1262             tlog.Debug(tag, $"ApplicationGetWindow END (OK)");
1263         }
1264
1265         [Test]
1266         [Category("P1")]
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()
1273         {
1274             tlog.Debug(tag, $"ApplicationAddIdle START");
1275
1276             try
1277             {
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);
1281             }
1282             catch (Exception e)
1283             {
1284                 tlog.Debug(tag, e.Message.ToString());
1285                 Assert.Fail("Caught Exception: Failed!");
1286             }
1287
1288             tlog.Debug(tag, $"ApplicationAddIdle END (OK)");
1289         }
1290
1291         [Test]
1292         [Category("P1")]
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()
1299         {
1300             tlog.Debug(tag, $"ApplicationLower START");
1301
1302             try
1303             {
1304                 Application.Instance.Lower();
1305             }
1306             catch (Exception e)
1307             {
1308                 tlog.Debug(tag, e.Message.ToString());
1309                 Assert.Fail("Caught Exception: Failed!");
1310             }
1311
1312             tlog.Debug(tag, $"ApplicationLower END (OK)");
1313         }
1314
1315         [Test]
1316         [Category("P1")]
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()
1323         {
1324             tlog.Debug(tag, $"ApplicationAssign START");
1325
1326             Widget widget = new Widget();
1327             var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
1328
1329             try
1330             {
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!");
1334             }
1335             catch (Exception e)
1336             {
1337                 tlog.Debug(tag, e.Message.ToString());
1338                 Assert.Fail("Caught Exception: Failed!");
1339             }
1340
1341             widget.Dispose();
1342             widget = null;
1343             tlog.Debug(tag, $"ApplicationAssign END (OK)");
1344         }
1345
1346         [Test]
1347         [Category("P1")]
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()
1354         {
1355             tlog.Debug(tag, $"ApplicationGetWindowList START");
1356
1357             try
1358             {
1359                 Application.GetWindowList();
1360             }
1361             catch (Exception e)
1362             {
1363                 tlog.Debug(tag, e.Message.ToString());
1364                 Assert.Fail("Caught Exception: Failed!");
1365             }
1366
1367             tlog.Debug(tag, $"ApplicationGetWindowList END (OK)");
1368         }
1369     }
1370 }