[NUI][NUI.Devel] Update line coverage TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Common / TSColor.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 System.Collections.Generic;
7 using System.Threading.Tasks;
8
9 namespace Tizen.NUI.Devel.Tests
10 {
11     using tlog = Tizen.Log;
12
13     [TestFixture]
14     [Description("public/Common/Color")]
15     public class PublicColorTest
16     {
17         private const string tag = "NUITEST";
18
19         [SetUp]
20         public void Init()
21         {
22             tlog.Info(tag, "Init() is called!");
23         }
24
25         [TearDown]
26         public void Destroy()
27         {
28             tlog.Info(tag, "Destroy() is called!");
29         }
30
31         [Test]
32         [Category("P1")]
33         [Description("Color constructor.")]
34         [Property("SPEC", "Tizen.NUI.Color.Color C")]
35         [Property("SPEC_URL", "-")]
36         [Property("CRITERIA", "CONSTR")]
37         [Property("AUTHOR", "guowei.wang@samsung.com")]
38         public void ColorConstructor()
39         {
40             tlog.Debug(tag, $"ColorConstructor START");
41
42             var testingTarget = new Color();
43             Assert.IsNotNull(testingTarget, "null handle");
44             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
45
46             testingTarget.Dispose();
47             tlog.Debug(tag, $"ColorConstructor END (OK)");
48         }
49
50         [Test]
51         [Category("P1")]
52         [Description("Color constructor. With RGBA component.")]
53         [Property("SPEC", "Tizen.NUI.Color.Color C")]
54         [Property("SPEC_URL", "-")]
55         [Property("CRITERIA", "CONSTR")]
56         [Property("AUTHOR", "guowei.wang@samsung.com")]
57         public void ColorConstructorWithRGBAComponent()
58         {
59             tlog.Debug(tag, $"ColorConstructorWithRGBAComponent START");
60
61             var testingTarget = new Color(0.5f, 0.5f, 0.5f, 1.0f);
62             Assert.IsNotNull(testingTarget, "null handle");
63             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
64
65             Assert.AreEqual(0.5f, testingTarget.R, "The R property of Black is not correct here.");
66             Assert.AreEqual(0.5f, testingTarget.G, "The G property of Black is not correct here.");
67             Assert.AreEqual(0.5f, testingTarget.B, "The B property of Black is not correct here.");
68             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Black is not correct here.");
69
70             testingTarget.Dispose();
71             tlog.Debug(tag, $"ColorConstructorWithRGBAComponent END (OK)");
72         }
73
74         [Test]
75         [Category("P1")]
76         [Description("Color constructor. With array.")]
77         [Property("SPEC", "Tizen.NUI.Color.Color C")]
78         [Property("SPEC_URL", "-")]
79         [Property("CRITERIA", "CONSTR")]
80         [Property("AUTHOR", "guowei.wang@samsung.com")]
81         public void ColorConstructorWithArray()
82         {
83             tlog.Debug(tag, $"ColorConstructorWithArray START");
84
85             float[] array = new float[4] { 0.5f, 0.5f, 0.5f, 1.0f };
86
87             var testingTarget = new Color(array);
88             Assert.IsNotNull(testingTarget, "null handle");
89             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
90
91             Assert.AreEqual(0.5f, testingTarget.R, "The R property of Black is not correct here.");
92             Assert.AreEqual(0.5f, testingTarget.G, "The G property of Black is not correct here.");
93             Assert.AreEqual(0.5f, testingTarget.B, "The B property of Black is not correct here.");
94             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Black is not correct here.");
95
96             testingTarget.Dispose();
97             tlog.Debug(tag, $"ColorConstructorWithArray END (OK)");
98         }
99
100         [Test]
101         [Category("P2")]
102         [Description("Color constructor. With invalid value.")]
103         [Property("SPEC", "Tizen.NUI.Color.Color C")]
104         [Property("SPEC_URL", "-")]
105         [Property("CRITERIA", "CONSTR")]
106         [Property("AUTHOR", "guowei.wang@samsung.com")]
107         public void ColorConstructorWithInvalidValue()
108         {
109             tlog.Debug(tag, $"ColorConstructorWithInvalidValue START");
110
111             float[] array = new float[4] { 0.5f, 2.0f, 0.5f, 1.0f };
112
113             var testingTarget = new Color(array);
114             Assert.IsNotNull(testingTarget, "null handle");
115             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
116
117             Assert.AreEqual(0.5f, testingTarget.R, "The R property of Black is not correct here.");
118             Assert.AreEqual(1.0f, testingTarget.G, "The G property of Black is not correct here.");
119             Assert.AreEqual(0.5f, testingTarget.B, "The B property of Black is not correct here.");
120             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Black is not correct here.");
121
122             testingTarget.Dispose();
123             tlog.Debug(tag, $"ColorConstructorWithInvalidValue END (OK)");
124         }
125
126         [Test]
127         [Category("P2")]
128         [Description("Color constructor. With null array.")]
129         [Property("SPEC", "Tizen.NUI.Color.Color C")]
130         [Property("SPEC_URL", "-")]
131         [Property("CRITERIA", "CONSTR")]
132         [Property("AUTHOR", "guowei.wang@samsung.com")]
133         public void ColorConstructorWithNullArray()
134         {
135             tlog.Debug(tag, $"ColorConstructorWithNullArray START");
136
137             float[] array = null;
138
139             try
140             {
141                 var testingTarget = new Color(array);
142                 Assert.Fail("Should return argument exception");
143             }
144             catch (ArgumentNullException)
145             {
146                 tlog.Debug(tag, $"ColorConstructorWithNullArray END (OK)");
147                 Assert.Pass("ArgumentException: passed!");
148             }
149         }
150
151         [Test]
152         [Category("P1")]
153         [Description("Color constructor. With string.")]
154         [Property("SPEC", "Tizen.NUI.Color.Color C")]
155         [Property("SPEC_URL", "-")]
156         [Property("CRITERIA", "CONSTR")]
157         [Property("AUTHOR", "guowei.wang@samsung.com")]
158         public void ColorConstructorWithString()
159         {
160             tlog.Debug(tag, $"ColorConstructorWithString START");
161
162             // Start with "#" && length is 8 
163             var testingTarget = new Tizen.NUI.Color("#C3CAD2FF");
164             Assert.IsNotNull(testingTarget, "null handle");
165             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
166
167             // Start with "#" && length is 3
168             testingTarget = new Color("#047");
169             Assert.IsNotNull(testingTarget, "null handle");
170             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
171
172             // isRGBA && length is 4
173             testingTarget = new Color("RGBA(30,15,240,110)");
174             Assert.IsNotNull(testingTarget, "null handle");
175             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
176
177             // isRGB && length is 3
178             testingTarget = new Color("RGB(0,4,7)");
179             Assert.IsNotNull(testingTarget, "null handle");
180             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
181
182             testingTarget.Dispose();
183             tlog.Debug(tag, $"ColorConstructorWithString END (OK)");
184         }
185
186         [Test]
187         [Category("P2")]
188         [Description("Color constructor. String is null.")]
189         [Property("SPEC", "Tizen.NUI.Color.Color C")]
190         [Property("SPEC_URL", "-")]
191         [Property("CRITERIA", "CONSTR")]
192         [Property("AUTHOR", "guowei.wang@samsung.com")]
193         public void ColorConstructorWithNullString()
194         {
195             tlog.Debug(tag, $"ColorConstructorWithNullString START");
196
197             string textColor = null;
198
199             try
200             {
201                 new Color(textColor);
202                 Assert.Fail("Should return argument exception");
203             }
204             catch (ArgumentException)
205             {
206                 tlog.Debug(tag, $"ColorConstructorWithNullString END (OK)");
207                 Assert.Pass("ArgumentException: passed!");
208             }
209         }
210
211         [Test]
212         [Category("P1")]
213         [Description("Color constructor. With System.Drawing.Color instance.")]
214         [Property("SPEC", "Tizen.NUI.Color.Color C")]
215         [Property("SPEC_URL", "-")]
216         [Property("CRITERIA", "CONSTR")]
217         [Property("AUTHOR", "guowei.wang@samsung.com")]
218         public void ColorConstructorWithSystemDrawingColorInstance()
219         {
220             tlog.Debug(tag, $"ColorConstructorWithSystemDrawingColorInstance START");
221
222             global::System.Drawing.Color color = global::System.Drawing.Color.FromArgb(255, 0, 0);
223
224             var testingTarget = new Color(color);
225             Assert.IsNotNull(testingTarget, "null handle");
226             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
227
228             testingTarget.Dispose();
229             tlog.Debug(tag, $"ColorConstructorWithSystemDrawingColorInstance END (OK)");
230         }
231
232         [Test]
233         [Category("P1")]
234         [Description("Color R.")]
235         [Property("SPEC", "Tizen.NUI.Color.R A")]
236         [Property("SPEC_URL", "-")]
237         [Property("CRITERIA", "PRW")]
238         [Property("AUTHOR", "guowei.wang@samsung.com")]
239         public void ColorR()
240         {
241             tlog.Debug(tag, $"ColorR START");
242
243             var testingTarget = new Color(0.5f, 0.5f, 0.5f, 1.0f);
244             Assert.IsNotNull(testingTarget, "null handle");
245             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
246
247             Assert.AreEqual(0.5f, testingTarget.R, "The R property of color is not correct.");
248
249             testingTarget.R = 0.4f;
250             Assert.AreEqual(0.4f, testingTarget.R, "The R property of color is not correct here.");
251
252             testingTarget.Dispose();
253             tlog.Debug(tag, $"ColorR END (OK)");
254         }
255
256         [Test]
257         [Category("P1")]
258         [Description("Color G.")]
259         [Property("SPEC", "Tizen.NUI.Color.G A")]
260         [Property("SPEC_URL", "-")]
261         [Property("CRITERIA", "PRW")]
262         [Property("AUTHOR", "guowei.wang@samsung.com")]
263         public void ColorG()
264         {
265             tlog.Debug(tag, $"ColorG START");
266
267             var testingTarget = new Color(0.5f, 0.5f, 0.5f, 1.0f);
268             Assert.IsNotNull(testingTarget, "null handle");
269             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
270
271             Assert.AreEqual(0.5f, testingTarget.G, "The G property of color is not correct.");
272
273             testingTarget.G = 0.4f;
274             Assert.AreEqual(0.4f, testingTarget.G, "The G property of color is not correct here.");
275
276             testingTarget.Dispose();
277             tlog.Debug(tag, $"ColorG END (OK)");
278         }
279
280         [Test]
281         [Category("P1")]
282         [Description("Color B.")]
283         [Property("SPEC", "Tizen.NUI.Color.B A")]
284         [Property("SPEC_URL", "-")]
285         [Property("CRITERIA", "PRW")]
286         [Property("AUTHOR", "guowei.wang@samsung.com")]
287         public void ColorB()
288         {
289             tlog.Debug(tag, $"ColorB START");
290
291             var testingTarget = new Color(0.5f, 0.5f, 0.5f, 1.0f);
292             Assert.IsNotNull(testingTarget, "null handle");
293             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
294
295             Assert.AreEqual(0.5f, testingTarget.B, "The B property of color is not correct.");
296
297             testingTarget.B = 0.4f;
298             Assert.AreEqual(0.4f, testingTarget.B, "The B property of color is not correct here.");
299
300             testingTarget.Dispose();
301             tlog.Debug(tag, $"ColorB END (OK)");
302         }
303
304         [Test]
305         [Category("P1")]
306         [Description("Color A.")]
307         [Property("SPEC", "Tizen.NUI.Color.A A")]
308         [Property("SPEC_URL", "-")]
309         [Property("CRITERIA", "PRW")]
310         [Property("AUTHOR", "guowei.wang@samsung.com")]
311         public void ColorA()
312         {
313             tlog.Debug(tag, $"ColorA START");
314
315             var testingTarget = new Color(0.5f, 0.5f, 0.5f, 1.0f);
316             Assert.IsNotNull(testingTarget, "null handle");
317             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
318
319             Assert.AreEqual(1.0f, testingTarget.A, "The A property of color is not correct.");
320
321             testingTarget.A = 0.4f;
322             Assert.AreEqual(0.4f, testingTarget.A, "The A property of color is not correct here.");
323
324             testingTarget.Dispose();
325             tlog.Debug(tag, $"ColorA END (OK)");
326         }
327
328         [Test]
329         [Category("P1")]
330         [Description("Color AliceBlue.")]
331         [Property("SPEC", "Tizen.NUI.Color.AliceBlue A")]
332         [Property("SPEC_URL", "-")]
333         [Property("CRITERIA", "PRO")]
334         [Property("AUTHOR", "guowei.wang@samsung.com")]
335         public void ColorAliceBlue()
336         {
337             tlog.Debug(tag, $"ColorAliceBlue START");
338
339             var testingTarget = Color.AliceBlue;
340             Assert.IsNotNull(testingTarget, "null handle");
341             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
342
343             testingTarget.Dispose();
344             tlog.Debug(tag, $"ColorAliceBlue END (OK)");
345         }
346
347         [Test]
348         [Category("P1")]
349         [Description("Color Aqua.")]
350         [Property("SPEC", "Tizen.NUI.Color.Aqua A")]
351         [Property("SPEC_URL", "-")]
352         [Property("CRITERIA", "PRO")]
353         [Property("AUTHOR", "guowei.wang@samsung.com")]
354         public void ColorAqua()
355         {
356             tlog.Debug(tag, $"ColorAqua START");
357
358             var testingTarget = Color.Aqua;
359             Assert.IsNotNull(testingTarget, "null handle");
360             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
361
362             testingTarget.Dispose();
363             tlog.Debug(tag, $"ColorAqua END (OK)");
364         }
365
366         [Test]
367         [Category("P1")]
368         [Description("Color Azure.")]
369         [Property("SPEC", "Tizen.NUI.Color.Azure A")]
370         [Property("SPEC_URL", "-")]
371         [Property("CRITERIA", "PRO")]
372         [Property("AUTHOR", "guowei.wang@samsung.com")]
373         public void ColorAzure()
374         {
375             tlog.Debug(tag, $"ColorAzure START");
376
377             var testingTarget = Color.Azure;
378             Assert.IsNotNull(testingTarget, "null handle");
379             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
380
381             testingTarget.Dispose();
382             tlog.Debug(tag, $"ColorAzure END (OK)");
383         }
384
385         [Test]
386         [Category("P1")]
387         [Description("Color Beige.")]
388         [Property("SPEC", "Tizen.NUI.Color.Beige A")]
389         [Property("SPEC_URL", "-")]
390         [Property("CRITERIA", "PRO")]
391         [Property("AUTHOR", "guowei.wang@samsung.com")]
392         public void ColorBeige()
393         {
394             tlog.Debug(tag, $"ColorBeige START");
395
396             var testingTarget = Color.Beige;
397             Assert.IsNotNull(testingTarget, "null handle");
398             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
399
400             testingTarget.Dispose();
401             tlog.Debug(tag, $"ColorBeige END (OK)");
402         }
403
404         [Test]
405         [Category("P1")]
406         [Description("Color Black.")]
407         [Property("SPEC", "Tizen.NUI.Color.Black A")]
408         [Property("SPEC_URL", "-")]
409         [Property("CRITERIA", "PRO")]
410         [Property("AUTHOR", "guowei.wang@samsung.com")]
411         public void ColorBlack()
412         {
413             tlog.Debug(tag, $"ColorBlack START");
414
415             var testingTarget = Color.Black;
416             Assert.IsNotNull(testingTarget, "null handle");
417             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
418
419             Assert.AreEqual(0.0f, testingTarget.R, "The R property of Black is not correct here.");
420             Assert.AreEqual(0.0f, testingTarget.G, "The G property of Black is not correct here.");
421             Assert.AreEqual(0.0f, testingTarget.B, "The B property of Black is not correct here.");
422             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Black is not correct here.");
423
424             testingTarget.Dispose();
425             tlog.Debug(tag, $"ColorBlack END (OK)");
426         }
427
428         [Test]
429         [Category("P1")]
430         [Description("Color Blue.")]
431         [Property("SPEC", "Tizen.NUI.Color.Blue A")]
432         [Property("SPEC_URL", "-")]
433         [Property("CRITERIA", "PRO")]
434         [Property("AUTHOR", "guowei.wang@samsung.com")]
435         public void ColorBlue()
436         {
437             tlog.Debug(tag, $"ColorBlue START");
438
439             var testingTarget = Color.Blue;
440             Assert.IsNotNull(testingTarget, "null handle");
441             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
442
443             Assert.AreEqual(0.0f, testingTarget.R, "The R property of Blue is not correct here.");
444             Assert.AreEqual(0.0f, testingTarget.G, "The G property of Blue is not correct here.");
445             Assert.AreEqual(1.0f, testingTarget.B, "The B property of Blue is not correct here.");
446             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Blue is not correct here.");
447
448             testingTarget.Dispose();
449             tlog.Debug(tag, $"ColorBlue END (OK)");
450         }
451
452         [Test]
453         [Category("P1")]
454         [Description("Color Chocolate.")]
455         [Property("SPEC", "Tizen.NUI.Color.Chocolate A")]
456         [Property("SPEC_URL", "-")]
457         [Property("CRITERIA", "PRO")]
458         [Property("AUTHOR", "guowei.wang@samsung.com")]
459         public void ColorChocolate()
460         {
461             tlog.Debug(tag, $"ColorChocolate START");
462
463             var testingTarget = Color.Chocolate;
464             Assert.IsNotNull(testingTarget, "null handle");
465             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
466
467             testingTarget.Dispose();
468             tlog.Debug(tag, $"ColorChocolate END (OK)");
469         }
470
471         [Test]
472         [Category("P1")]
473         [Description("Color Cornsilk.")]
474         [Property("SPEC", "Tizen.NUI.Color.Cornsilk A")]
475         [Property("SPEC_URL", "-")]
476         [Property("CRITERIA", "PRO")]
477         [Property("AUTHOR", "guowei.wang@samsung.com")]
478         public void ColorCornsilk()
479         {
480             tlog.Debug(tag, $"ColorCornsilk START");
481
482             var testingTarget = Color.Cornsilk;
483             Assert.IsNotNull(testingTarget, "null handle");
484             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
485
486             testingTarget.Dispose();
487             tlog.Debug(tag, $"ColorCornsilk END (OK)");
488         }
489
490         [Test]
491         [Category("P1")]
492         [Description("Color Crimson.")]
493         [Property("SPEC", "Tizen.NUI.Color.Crimson A")]
494         [Property("SPEC_URL", "-")]
495         [Property("CRITERIA", "PRO")]
496         [Property("AUTHOR", "guowei.wang@samsung.com")]
497         public void ColorCrimson()
498         {
499             tlog.Debug(tag, $"ColorCrimson START");
500
501             var testingTarget = Color.Crimson;
502             Assert.IsNotNull(testingTarget, "null handle");
503             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
504
505             testingTarget.Dispose();
506             tlog.Debug(tag, $"ColorCrimson END (OK)");
507         }
508
509         [Test]
510         [Category("P1")]
511         [Description("Color Cyan.")]
512         [Property("SPEC", "Tizen.NUI.Color.Cyan A")]
513         [Property("SPEC_URL", "-")]
514         [Property("CRITERIA", "PRO")]
515         [Property("AUTHOR", "guowei.wang@samsung.com")]
516         public void ColorCyan()
517         {
518             tlog.Debug(tag, $"ColorCyan START");
519
520             var testingTarget = Color.Cyan;
521             Assert.IsNotNull(testingTarget, "null handle");
522             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
523
524             Assert.AreEqual(0.0f, testingTarget.R, "The R property of Cyan is not correct here.");
525             Assert.AreEqual(1.0f, testingTarget.G, "The G property of Cyan is not correct here.");
526             Assert.AreEqual(1.0f, testingTarget.B, "The B property of Cyan is not correct here.");
527             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Cyan is not correct here.");
528
529             testingTarget.Dispose();
530             tlog.Debug(tag, $"ColorCyan END (OK)");
531         }
532
533         [Test]
534         [Category("P1")]
535         [Description("Color DarkGray.")]
536         [Property("SPEC", "Tizen.NUI.Color.DarkGray A")]
537         [Property("SPEC_URL", "-")]
538         [Property("CRITERIA", "PRO")]
539         [Property("AUTHOR", "guowei.wang@samsung.com")]
540         public void ColorDarkGray()
541         {
542             tlog.Debug(tag, $"ColorDarkGray START");
543
544             var testingTarget = Color.DarkGray;
545             Assert.IsNotNull(testingTarget, "null handle");
546             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
547
548             Assert.AreEqual(0.6627451f, testingTarget.R, "The R property of DarkGray is not correct here.");
549             Assert.AreEqual(0.6627451f, testingTarget.G, "The G property of DarkGray is not correct here.");
550             Assert.AreEqual(0.6627451f, testingTarget.B, "The B property of DarkGray is not correct here.");
551             Assert.AreEqual(1.0f, testingTarget.A, "The A property of DarkGray is not correct here.");
552
553             testingTarget.Dispose();
554             tlog.Debug(tag, $"ColorDarkGray END (OK)");
555         }
556
557         [Test]
558         [Category("P1")]
559         [Description("Color DarkGreen.")]
560         [Property("SPEC", "Tizen.NUI.Color.DarkGreen A")]
561         [Property("SPEC_URL", "-")]
562         [Property("CRITERIA", "PRO")]
563         [Property("AUTHOR", "guowei.wang@samsung.com")]
564         public void ColorDarkGreen()
565         {
566             tlog.Debug(tag, $"ColorDarkGreen START");
567
568             var testingTarget = Color.DarkGreen;
569             Assert.IsNotNull(testingTarget, "null handle");
570             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
571
572             testingTarget.Dispose();
573             tlog.Debug(tag, $"ColorDarkGreen END (OK)");
574         }
575
576         [Test]
577         [Category("P1")]
578         [Description("Color DarkOrange.")]
579         [Property("SPEC", "Tizen.NUI.Color.DarkOrange A")]
580         [Property("SPEC_URL", "-")]
581         [Property("CRITERIA", "PRO")]
582         [Property("AUTHOR", "guowei.wang@samsung.com")]
583         public void ColorDarkOrange()
584         {
585             tlog.Debug(tag, $"ColorDarkOrange START");
586
587             var testingTarget = Color.DarkOrange;
588             Assert.IsNotNull(testingTarget, "null handle");
589             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
590
591             testingTarget.Dispose();
592             tlog.Debug(tag, $"ColorDarkOrange END (OK)");
593         }
594
595         [Test]
596         [Category("P1")]
597         [Description("Color DarkOrchid.")]
598         [Property("SPEC", "Tizen.NUI.Color.DarkOrchid A")]
599         [Property("SPEC_URL", "-")]
600         [Property("CRITERIA", "PRO")]
601         [Property("AUTHOR", "guowei.wang@samsung.com")]
602         public void ColorDarkOrchid()
603         {
604             tlog.Debug(tag, $"ColorDarkOrchid START");
605
606             var testingTarget = Color.DarkOrchid;
607             Assert.IsNotNull(testingTarget, "null handle");
608             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
609
610             testingTarget.Dispose();
611             tlog.Debug(tag, $"ColorDarkOrchid END (OK)");
612         }
613
614         [Test]
615         [Category("P1")]
616         [Description("Color White.")]
617         [Property("SPEC", "Tizen.NUI.Color.White A")]
618         [Property("SPEC_URL", "-")]
619         [Property("CRITERIA", "PRO")]
620         [Property("AUTHOR", "guowei.wang@samsung.com")]
621         public void ColorWhite()
622         {
623             tlog.Debug(tag, $"ColorWhite START");
624
625             var testingTarget = Color.White;
626             Assert.IsNotNull(testingTarget, "null handle");
627             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
628
629             Assert.AreEqual(1.0f, testingTarget.R, "The R property of White is not correct here.");
630             Assert.AreEqual(1.0f, testingTarget.G, "The G property of White is not correct here.");
631             Assert.AreEqual(1.0f, testingTarget.B, "The B property of White is not correct here.");
632             Assert.AreEqual(1.0f, testingTarget.A, "The A property of White is not correct here.");
633
634             testingTarget.Dispose();
635             tlog.Debug(tag, $"ColorWhite END (OK)");
636         }
637
638         [Test]
639         [Category("P1")]
640         [Description("Color Red.")]
641         [Property("SPEC", "Tizen.NUI.Color.Red A")]
642         [Property("SPEC_URL", "-")]
643         [Property("CRITERIA", "PRO")]
644         [Property("AUTHOR", "guowei.wang@samsung.com")]
645         public void ColorRed()
646         {
647             tlog.Debug(tag, $"ColorRed START");
648
649             var testingTarget = Color.Red;
650             Assert.IsNotNull(testingTarget, "null handle");
651             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
652
653             Assert.AreEqual(1.0f, testingTarget.R, "The R property of Red is not correct here.");
654             Assert.AreEqual(0.0f, testingTarget.G, "The G property of Red is not correct here.");
655             Assert.AreEqual(0.0f, testingTarget.B, "The B property of Red is not correct here.");
656             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Red is not correct here.");
657
658             testingTarget.Dispose();
659             tlog.Debug(tag, $"ColorRed END (OK)");
660         }
661
662         [Test]
663         [Category("P1")]
664         [Description("Color Green.")]
665         [Property("SPEC", "Tizen.NUI.Color.Green A")]
666         [Property("SPEC_URL", "-")]
667         [Property("CRITERIA", "PRO")]
668         [Property("AUTHOR", "guowei.wang@samsung.com")]
669         public void ColorGreen()
670         {
671             tlog.Debug(tag, $"ColorGreen START");
672
673             var testingTarget = Color.Green;
674             Assert.IsNotNull(testingTarget, "null handle");
675             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
676
677             Assert.AreEqual(0.0f, testingTarget.R, "The R property of Green is not correct here.");
678             Assert.AreEqual(1.0f, testingTarget.G, "The G property of Green is not correct here.");
679             Assert.AreEqual(0.0f, testingTarget.B, "The B property of Green is not correct here.");
680             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Green is not correct here.");
681
682             testingTarget.Dispose();
683             tlog.Debug(tag, $"ColorGreen END (OK)");
684         }
685
686         [Test]
687         [Category("P1")]
688         [Description("Color Yellow.")]
689         [Property("SPEC", "Tizen.NUI.Color.Yellow A")]
690         [Property("SPEC_URL", "-")]
691         [Property("CRITERIA", "PRO")]
692         [Property("AUTHOR", "guowei.wang@samsung.com")]
693         public void ColorYellow()
694         {
695             tlog.Debug(tag, $"ColorYellow START");
696
697             var testingTarget = Color.Yellow;
698             Assert.IsNotNull(testingTarget, "null handle");
699             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
700
701             Assert.AreEqual(1.0f, testingTarget.R, "The R property of Yellow is not correct here.");
702             Assert.AreEqual(1.0f, testingTarget.G, "The G property of Yellow is not correct here.");
703             Assert.AreEqual(0.0f, testingTarget.B, "The B property of Yellow is not correct here.");
704             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Yellow is not correct here.");
705
706             testingTarget.Dispose();
707             tlog.Debug(tag, $"ColorYellow END (OK)");
708         }
709
710         [Test]
711         [Category("P1")]
712         [Description("Color Magenta.")]
713         [Property("SPEC", "Tizen.NUI.Color.Magenta A")]
714         [Property("SPEC_URL", "-")]
715         [Property("CRITERIA", "PRO")]
716         [Property("AUTHOR", "guowei.wang@samsung.com")]
717         public void ColorMagenta()
718         {
719             tlog.Debug(tag, $"ColorMagenta START");
720
721             var testingTarget = Color.Magenta;
722             Assert.IsNotNull(testingTarget, "null handle");
723             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
724
725             Assert.AreEqual(1.0f, testingTarget.R, "The R property of Magenta is not correct here.");
726             Assert.AreEqual(0.0f, testingTarget.G, "The G property of Magenta is not correct here.");
727             Assert.AreEqual(1.0f, testingTarget.B, "The B property of Magenta is not correct here.");
728             Assert.AreEqual(1.0f, testingTarget.A, "The A property of Magenta is not correct here.");
729
730             testingTarget.Dispose();
731             tlog.Debug(tag, $"ColorMagenta END (OK)");
732         }
733
734         [Test]
735         [Category("P1")]
736         [Description("Color Transparent.")]
737         [Property("SPEC", "Tizen.NUI.Color.Transparent A")]
738         [Property("SPEC_URL", "-")]
739         [Property("CRITERIA", "PRO")]
740         [Property("AUTHOR", "guowei.wang@samsung.com")]
741         public void ColorTransparent()
742         {
743             tlog.Debug(tag, $"ColorTransparent START");
744
745             var testingTarget = Color.Transparent;
746             Assert.IsNotNull(testingTarget, "null handle");
747             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
748
749             Assert.AreEqual(0.0f, testingTarget.R, "The R property of Transparent is not correct here.");
750             Assert.AreEqual(0.0f, testingTarget.G, "The G property of Transparent is not correct here.");
751             Assert.AreEqual(0.0f, testingTarget.B, "The B property of Transparent is not correct here.");
752             Assert.AreEqual(0.0f, testingTarget.A, "The A property of Transparent is not correct here.");
753
754             testingTarget.Dispose();
755             tlog.Debug(tag, $"ColorTransparent END (OK)");
756         }
757
758         [Test]
759         [Category("P1")]
760         [Description("Color this[uint index]. Get value by subscript.")]
761         [Property("SPEC", "Tizen.NUI.Color.this[uint] A")]
762         [Property("SPEC_URL", "-")]
763         [Property("CRITERIA", "PRO")]
764         [Property("AUTHOR", "guowei.wang@samsung.com")]
765         public void ColorGetValueBySubscript()
766         {
767             tlog.Debug(tag, $"ColorGetValueBySubscript START");
768
769             var testingTarget = new Color(0.1f, 0.2f, 0.3f, 0.4f);
770             Assert.IsNotNull(testingTarget, "null handle");
771             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
772
773             Assert.AreEqual(0.1f, testingTarget[0], "The value of index[0] is not correct!");
774             Assert.AreEqual(0.2f, testingTarget[1], "The value of index[1] is not correct!");
775             Assert.AreEqual(0.3f, testingTarget[2], "The value of index[2] is not correct!");
776             Assert.AreEqual(0.4f, testingTarget[3], "The value of index[3] is not correct!");
777
778             testingTarget.Dispose();
779             tlog.Debug(tag, $"ColorGetValueBySubscript END (OK)");
780         }
781
782         [Test]
783         [Category("P1")]
784         [Description("Color operator +.")]
785         [Property("SPEC", "Tizen.NUI.Color.+ M")]
786         [Property("SPEC_URL", "-")]
787         [Property("CRITERIA", "MR")]
788         [Property("AUTHOR", "guowei.wang@samsung.com")]
789         public void ColorAddition()
790         {
791             tlog.Debug(tag, $"ColorAddition START");
792
793             Color color1 = new Color(0.1f, 0.2f, 0.3f, 0.4f);
794             Color color2 = new Color(0.4f, 0.3f, 0.5f, 0.6f);
795
796             var testingTarget = color1 + color2;
797             Assert.IsNotNull(testingTarget, "null handle");
798             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
799
800             Assert.AreEqual(0.5f, testingTarget.R, "The R value of the color is not correct!");
801             Assert.AreEqual(0.5f, testingTarget.G, "The G value of the color is not correct!");
802             Assert.AreEqual(0.8f, testingTarget.B, "The B value of the color is not correct!");
803             Assert.AreEqual(1.0f, testingTarget.A, "The A value of the color is not correct!");
804
805             color1.Dispose();
806             color2.Dispose();
807             testingTarget.Dispose();
808             tlog.Debug(tag, $"ColorAddition END (OK)");
809         }
810
811         [Test]
812         [Category("P1")]
813         [Description("Color operator -.")]
814         [Property("SPEC", "Tizen.NUI.Color.- M")]
815         [Property("SPEC_URL", "-")]
816         [Property("CRITERIA", "MR")]
817         [Property("AUTHOR", "guowei.wang@samsung.com")]
818         public void ColorSubtraction()
819         {
820             tlog.Debug(tag, $"ColorSubtraction START");
821
822             Color color1 = new Color(0.1f, 0.2f, 0.3f, 0.4f);
823             Color color2 = new Color(0.4f, 0.3f, 0.5f, 0.6f);
824
825             var testingTarget = color2 - color1;
826             Assert.IsNotNull(testingTarget, "null handle");
827             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
828
829             Assert.Less(Math.Abs(0.3f - testingTarget.R), 0.001f, "The R value of the color is not correct!");
830             Assert.Less(Math.Abs(0.1f - testingTarget.G), 0.001f, "The G value of the color is not correct!");
831             Assert.Less(Math.Abs(0.2f - testingTarget.B), 0.001f, "The B value of the color is not correct!");
832             Assert.Less(Math.Abs(0.2f - testingTarget.A), 0.001f, "The A value of the color is not correct!");
833
834             color1.Dispose();
835             color2.Dispose();
836             testingTarget.Dispose();
837             tlog.Debug(tag, $"ColorSubtraction END (OK)");
838         }
839
840         [Test]
841         [Category("P1")]
842         [Description("Color Unary Negation.")]
843         [Property("SPEC", "Tizen.NUI.Color.UnaryNegation M")]
844         [Property("SPEC_URL", "-")]
845         [Property("CRITERIA", "MR")]
846         [Property("AUTHOR", "guowei.wang@samsung.com")]
847         public void ColorUnaryNegation()
848         {
849             tlog.Debug(tag, $"ColorUnaryNegation START");
850
851             Color color = new Color(0.1f, 0.2f, 0.3f, 0.4f);
852
853             var testingTarget = -color;
854             Assert.IsNotNull(testingTarget, "null handle");
855             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
856
857             Assert.AreEqual(0.0f, testingTarget.R, "The R value of the color is not correct!");
858             Assert.AreEqual(0.0f, testingTarget.G, "The G value of the color is not correct!");
859             Assert.AreEqual(0.0f, testingTarget.B, "The B value of the color is not correct!");
860             Assert.AreEqual(0.0f, testingTarget.A, "The A value of the color is not correct!");
861
862             color.Dispose();
863             testingTarget.Dispose();
864             tlog.Debug(tag, $"ColorUnaryNegation END (OK)");
865         }
866
867         [Test]
868         [Category("P1")]
869         [Description("Color operator *.")]
870         [Property("SPEC", "Tizen.NUI.Color.* M")]
871         [Property("SPEC_URL", "-")]
872         [Property("CRITERIA", "MR")]
873         [Property("AUTHOR", "guowei.wang@samsung.com")]
874         public void ColorMultiply()
875         {
876             tlog.Debug(tag, $"ColorMultiply START");
877
878             Color color1 = new Color(0.1f, 0.2f, 0.3f, 0.1f);
879             Color color2 = new Color(0.4f, 0.3f, 0.2f, 0.6f);
880
881             var testingTarget = color2 * color1;
882             Assert.IsNotNull(testingTarget, "null handle");
883             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
884
885             Assert.AreEqual(0.04f, testingTarget.R, 0.00001, "The R value of the color is not correct!");
886             Assert.AreEqual(0.06f, testingTarget.G, 0.00001, "The G value of the color is not correct!");
887             Assert.AreEqual(0.06f, testingTarget.B, 0.00001, "The B value of the color is not correct!");
888             Assert.AreEqual(0.06f, testingTarget.A, 0.00001, "The A value of the color is not correct!");
889
890             color1.Dispose();
891             color2.Dispose();
892             testingTarget.Dispose();
893             tlog.Debug(tag, $"ColorMultiply END (OK)");
894         }
895
896         [Test]
897         [Category("P1")]
898         [Description("Color operator *. By float.")]
899         [Property("SPEC", "Tizen.NUI.Color.* M")]
900         [Property("SPEC_URL", "-")]
901         [Property("CRITERIA", "MR")]
902         [Property("AUTHOR", "guowei.wang@samsung.com")]
903         public void ColorMultiplyByFloat()
904         {
905             tlog.Debug(tag, $"ColorMultiplyByFloat START");
906
907             Color color = new Color(0.1f, 0.2f, 0.3f, 0.1f);
908
909             var testingTarget = color * 2.0f;
910             Assert.IsNotNull(testingTarget, "null handle");
911             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
912
913             Assert.Less(Math.Abs(0.2f - testingTarget.R), 0.001f, "The R value of the color is not correct!");
914             Assert.Less(Math.Abs(0.4f - testingTarget.G), 0.001f, "The G value of the color is not correct!");
915             Assert.Less(Math.Abs(0.6f - testingTarget.B), 0.001f, "The B value of the color is not correct!");
916             Assert.Less(Math.Abs(0.2f - testingTarget.A), 0.001f, "The A value of the color is not correct!");
917
918             color.Dispose();
919             testingTarget.Dispose();
920             tlog.Debug(tag, $"ColorMultiplyByFloat END (OK)");
921         }
922
923         [Test]
924         [Category("P1")]
925         [Description("Color operator /.")]
926         [Property("SPEC", "Tizen.NUI.Color./ M")]
927         [Property("SPEC_URL", "-")]
928         [Property("CRITERIA", "MR")]
929         [Property("AUTHOR", "guowei.wang@samsung.com")]
930         public void ColorDivision()
931         {
932             tlog.Debug(tag, $"ColorDivision START");
933
934             Color color1 = new Color(0.2f, 0.2f, 0.3f, 0.1f);
935             Color color2 = new Color(0.04f, 0.06f, 0.06f, 0.06f);
936
937             Color testingTarget = color2 / color1;
938             Assert.IsNotNull(testingTarget, "null handle");
939             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
940
941             Assert.Less(Math.Abs(0.2f - testingTarget.R), 0.001f, "The R value of the color is not correct!");
942             Assert.Less(Math.Abs(0.3f - testingTarget.G), 0.001f, "The G value of the color is not correct!");
943             Assert.Less(Math.Abs(0.2f - testingTarget.B), 0.001f, "The B value of the color is not correct!");
944             Assert.Less(Math.Abs(0.6f - testingTarget.A), 0.001f, "The A value of the color is not correct!");
945
946             color1.Dispose();
947             color2.Dispose();
948             testingTarget.Dispose();
949             tlog.Debug(tag, $"ColorDivision END (OK)");
950         }
951
952         [Test]
953         [Category("P1")]
954         [Description("Color EqualTo.")]
955         [Property("SPEC", "Tizen.NUI.Color.EqualTo M")]
956         [Property("SPEC_URL", "-")]
957         [Property("CRITERIA", "MR")]
958         [Property("AUTHOR", "guowei.wang@samsung.com")]
959         public void ColorEqualTo()
960         {
961             tlog.Debug(tag, $"ColorEqualTo START");
962
963             var testingTarget = new Color(0.1f, 0.2f, 0.3f, 0.4f);
964             Assert.IsNotNull(testingTarget, "null handle");
965             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
966
967             using (Color color = new Color(0.1f, 0.2f, 0.3f, 0.4f))
968             {
969                 Assert.IsTrue((testingTarget.EqualTo(color)), "Should be equal");
970             }
971
972             testingTarget.Dispose();
973             tlog.Debug(tag, $"ColorEqualTo END (OK)");
974         }
975
976         [Test]
977         [Category("P1")]
978         [Description("Color NotEqualTo.")]
979         [Property("SPEC", "Tizen.NUI.Color.NotEqualTo M")]
980         [Property("SPEC_URL", "-")]
981         [Property("CRITERIA", "MR")]
982         [Property("AUTHOR", "guowei.wang@samsung.com")]
983         public void ColorNotEqualTo()
984         {
985             tlog.Debug(tag, $"ColorNotEqualTo START");
986
987             var testingTarget = new Color(0.1f, 0.2f, 0.3f, 0.4f);
988             Assert.IsNotNull(testingTarget, "null handle");
989             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
990
991             using (Color color = new Color(0.4f, 0.3f, 0.2f, 0.1f))
992             {
993                 Assert.IsTrue((testingTarget.NotEqualTo(color)), "Should be equal");
994             }
995
996             testingTarget.Dispose();
997             tlog.Debug(tag, $"ColorNotEqualTo END (OK)");
998         }
999
1000         [Test]
1001         [Category("P1")]
1002         [Description("Color implicit. Vector4 to color.")]
1003         [Property("SPEC", "Tizen.NUI.Color.implicit M")]
1004         [Property("SPEC_URL", "-")]
1005         [Property("CRITERIA", "MR")]
1006         [Property("AUTHOR", "guowei.wang@samsung.com")]
1007         public void ColorImplicitConvertFromVector4()
1008         {
1009             tlog.Debug(tag, $"ColorImplicitConvertFromVector4 START");
1010
1011             Color testingTarget = null;
1012             using (Vector4 vector = new Vector4(0.1f, 0.2f, 0.3f, 0.4f))
1013             {
1014                 testingTarget = vector;
1015                 Assert.AreEqual(testingTarget.R, vector.R, "The value of R is not correct.");
1016                 Assert.AreEqual(testingTarget.G, vector.G, "The value of G is not correct.");
1017                 Assert.AreEqual(testingTarget.B, vector.B, "The value of B is not correct.");
1018                 Assert.AreEqual(testingTarget.A, vector.A, "The value of A is not correct.");
1019             }
1020
1021             testingTarget.Dispose();
1022             tlog.Debug(tag, $"ColorImplicitConvertFromVector4 END (OK)");
1023         }
1024
1025         [Test]
1026         [Category("P1")]
1027         [Description("Color implicit. Color to vector4.")]
1028         [Property("SPEC", "Tizen.NUI.Color.implicit M")]
1029         [Property("SPEC_URL", "-")]
1030         [Property("CRITERIA", "MR")]
1031         [Property("AUTHOR", "guowei.wang@samsung.com")]
1032         public void ColorImplicitConvertToVector4()
1033         {
1034             tlog.Debug(tag, $"ColorImplicitConvertToVector4 START");
1035
1036             Vector4 testingTarget = null;
1037             using (Color color = new Color(0.1f, 0.2f, 0.3f, 0.4f))
1038             {
1039                 testingTarget = color;
1040                 Assert.AreEqual(color.R, testingTarget.R, "The value of R is not correct.");
1041                 Assert.AreEqual(color.G, testingTarget.G, "The value of G is not correct.");
1042                 Assert.AreEqual(color.B, testingTarget.B, "The value of B is not correct.");
1043                 Assert.AreEqual(color.A, testingTarget.A, "The value of A is not correct.");
1044             }
1045
1046             testingTarget.Dispose();
1047             tlog.Debug(tag, $"ColorImplicitConvertToVector4 END (OK)");
1048         }
1049
1050         [Test]
1051         [Category("P1")]
1052         [Description("Color GetHashCode.")]
1053         [Property("SPEC", "Tizen.NUI.Color.GetHashCode M")]
1054         [Property("SPEC_URL", "-")]
1055         [Property("CRITERIA", "MR")]
1056         [Property("AUTHOR", "guowei.wang@samsung.com")]
1057         public void ColorGetHashCode()
1058         {
1059             tlog.Debug(tag, $"ColorGetHashCode START");
1060
1061             var testingTarget = new Color(0.1f, 0.3f, 0.4f, 0.8f);
1062             Assert.IsNotNull(testingTarget, "null handle");
1063             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
1064
1065             var result = testingTarget.GetHashCode();
1066             tlog.Debug(tag, "GetHashCode : " + result);
1067
1068             testingTarget.Dispose();
1069             tlog.Debug(tag, $"ColorGetHashCode END (OK)");
1070         }
1071
1072         [Test]
1073         [Category("P1")]
1074         [Description("Color Equals.")]
1075         [Property("SPEC", "Tizen.NUI.Color.Equals M")]
1076         [Property("SPEC_URL", "-")]
1077         [Property("CRITERIA", "MR")]
1078         [Property("AUTHOR", "guowei.wang@samsung.com")]
1079         public void ColorEquals()
1080         {
1081             tlog.Debug(tag, $"ColorEquals START");
1082
1083             var testingTarget = new Color(0.1f, 0.3f, 0.4f, 0.8f);
1084             Assert.IsNotNull(testingTarget, "null handle");
1085             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
1086
1087             using (Size size = new Size(20, 30))
1088             {
1089                 var result = testingTarget.Equals(size);
1090                 Assert.IsFalse(result);
1091             }
1092
1093             using (Color color = testingTarget)
1094             {
1095                 var result = testingTarget.Equals(color);
1096                 Assert.IsTrue(result);
1097             }
1098
1099             testingTarget.Dispose();
1100             tlog.Debug(tag, $"ColorEquals END (OK)");
1101         }
1102
1103         [Test]
1104         [Category("P2")]
1105         [Description("Color Equals. With null object")]
1106         [Property("SPEC", "Tizen.NUI.Color.Equals M")]
1107         [Property("SPEC_URL", "-")]
1108         [Property("CRITERIA", "MR")]
1109         [Property("AUTHOR", "guowei.wang@samsung.com")]
1110         public void ColorEqualsWithNullObject()
1111         {
1112             tlog.Debug(tag, $"ColorEqualsWithNullObject START");
1113
1114             var testingTarget = new Color(0.1f, 0.3f, 0.4f, 0.8f);
1115             Assert.IsNotNull(testingTarget, "null handle");
1116             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
1117
1118             var result = testingTarget.Equals(null);
1119             Assert.IsFalse(result);
1120
1121             testingTarget.Dispose();
1122             tlog.Debug(tag, $"ColorEqualsWithNullObject END (OK)");
1123         }
1124
1125         [Test]
1126         [Category("P2")]
1127         [Description("Color GetColorFromPtr.")]
1128         [Property("SPEC", "Tizen.NUI.Color.Equals M")]
1129         [Property("SPEC_URL", "-")]
1130         [Property("CRITERIA", "MR")]
1131         [Property("AUTHOR", "guowei.wang@samsung.com")]
1132         public void ColorGetColorFromPtr()
1133         {
1134             tlog.Debug(tag, $"ColorGetColorFromPtr START");
1135
1136             using (Color color = Color.Cyan)
1137             {
1138                 var testingTarget = Color.GetColorFromPtr(color.SwigCPtr.Handle);
1139                 Assert.IsNotNull(testingTarget, "null handle");
1140                 Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
1141
1142                 testingTarget.Dispose();
1143             }
1144
1145             tlog.Debug(tag, $"ColorGetColorFromPtr END (OK)");
1146         }
1147
1148         [Test]
1149         [Category("P1")]
1150         [Description("Color Dispose.")]
1151         [Property("SPEC", "Tizen.NUI.Color.Dispose M")]
1152         [Property("SPEC_URL", "-")]
1153         [Property("CRITERIA", "MR MCST")]
1154         [Property("AUTHOR", "guowei.wang@samsung.com")]
1155         public void ColorDispose()
1156         {
1157             tlog.Debug(tag, $"ColorDispose START");
1158
1159             var testingTarget = new Color();
1160             Assert.IsNotNull(testingTarget, "null handle");
1161             Assert.IsInstanceOf<Color>(testingTarget, "Should return Color instance.");
1162
1163             try
1164             {
1165                 testingTarget.Dispose();
1166             }
1167             catch (Exception e)
1168             {
1169                 Assert.Fail("Caught Exception" + e.ToString());
1170             }
1171
1172             tlog.Debug(tag, $"ColorDispose END (OK)");
1173         }
1174     }
1175 }