3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("public/Visuals/VisualMaps")]
13 public class PublicVisualMapsTest
15 private const string tag = "NUITEST";
16 private static bool flagComposingPropertyMap;
17 internal class MyVisualMap : VisualMap
19 protected override void ComposingPropertyMap()
21 flagComposingPropertyMap = true;
22 base.ComposingPropertyMap();
29 tlog.Info(tag, "Init() is called!");
35 tlog.Info(tag, "Destroy() is called!");
40 [Description("VisualMap constructor.")]
41 [Property("SPEC", "Tizen.NUI.VisualMap.VisualMap C")]
42 [Property("SPEC_URL", "-")]
43 [Property("CRITERIA", "CONSTR")]
44 [Property("AUTHOR", "guowei.wang@samsung.com")]
45 public void VisualMapConstructor()
47 tlog.Debug(tag, $"VisualMapConstructor START");
49 var testingTarget = new VisualMap();
50 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
51 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
53 testingTarget.Dispose();
54 tlog.Debug(tag, $"VisualMapConstructor END (OK)");
59 [Description("VisualMap VisualSize.")]
60 [Property("SPEC", "Tizen.NUI.VisualMap.Size A")]
61 [Property("SPEC_URL", "-")]
62 [Property("CRITERIA", "PRW")]
63 [Property("AUTHOR", "guowei.wang@samsung.com")]
64 public void VisualMapSize()
66 tlog.Debug(tag, $"VisualMapSize START");
68 var testingTarget = new VisualMap();
69 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
70 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
72 using (Vector2 vector2 = new Vector2(1.0f, 1.0f))
74 testingTarget.Size = vector2;
75 Assert.AreEqual(1.0f, testingTarget.Size.Width, "Retrieved VisualSize.Width should be equal to set value");
76 Assert.AreEqual(1.0f, testingTarget.Size.Height, "Retrieved VisualSize.Height should be equal to set value");
79 testingTarget.Dispose();
80 tlog.Debug(tag, $"VisualMapSize END (OK)");
85 [Description("VisualMap MixColor.")]
86 [Property("SPEC", "Tizen.NUI.VisualMap.MixColor A")]
87 [Property("SPEC_URL", "-")]
88 [Property("CRITERIA", "PRW")]
89 [Property("AUTHOR", "guowei.wang@samsung.com")]
90 public void VisualMapMixColor()
92 tlog.Debug(tag, $"VisualMapMixColor START");
94 var testingTarget = new VisualMap();
95 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
96 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
98 using (Color color = new Color(0.5f, 1.0f, 0.6f, 1.0f))
100 testingTarget.MixColor = color;
101 Assert.AreEqual(0.5f, testingTarget.MixColor.R, "Retrieved VisualSize.MixColor.R should be equal to set value");
102 Assert.AreEqual(1.0f, testingTarget.MixColor.G, "Retrieved VisualSize.MixColor.G should be equal to set value");
103 Assert.AreEqual(0.6f, testingTarget.MixColor.B, "Retrieved VisualSize.MixColor.B should be equal to set value");
104 Assert.AreEqual(1.0f, testingTarget.MixColor.A, "Retrieved VisualSize.MixColor.A should be equal to set value");
107 testingTarget.Dispose();
108 tlog.Debug(tag, $"VisualMapMixColor END (OK)");
113 [Description("VisualMap Opacity.")]
114 [Property("SPEC", "Tizen.NUI.VisualMap.Opacity A")]
115 [Property("SPEC_URL", "-")]
116 [Property("CRITERIA", "PRW")]
117 [Property("AUTHOR", "guowei.wang@samsung.com")]
118 public void VisualMapOpacity()
120 tlog.Debug(tag, $"VisualMapOpacity START");
122 var testingTarget = new VisualMap();
123 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
124 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
126 testingTarget.Opacity = 0.5f;
127 Assert.AreEqual(0.5f, testingTarget.Opacity, "Retrieved VisualSize.Opacity should be equal to set value");
129 testingTarget.Dispose();
130 tlog.Debug(tag, $"VisualMapOpacity END (OK)");
135 [Description("VisualMap PremultipliedAlpha.")]
136 [Property("SPEC", "Tizen.NUI.VisualMap.PremultipliedAlpha A")]
137 [Property("SPEC_URL", "-")]
138 [Property("CRITERIA", "PRW")]
139 [Property("AUTHOR", "guowei.wang@samsung.com")]
140 public void VisualMapPremultipliedAlpha()
142 tlog.Debug(tag, $"VisualMapPremultipliedAlpha START");
144 var testingTarget = new VisualMap();
145 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
146 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
148 testingTarget.PremultipliedAlpha = true;
149 Assert.IsTrue(testingTarget.PremultipliedAlpha, "Retrieved VisualSize.PremultipliedAlpha should be equal to set value");
151 testingTarget.Dispose();
152 tlog.Debug(tag, $"VisualMapPremultipliedAlpha END (OK)");
157 [Description("VisualMap RelativePosition.")]
158 [Property("SPEC", "Tizen.NUI.VisualMap.RelativePosition A")]
159 [Property("SPEC_URL", "-")]
160 [Property("CRITERIA", "PRW")]
161 [Property("AUTHOR", "guowei.wang@samsung.com")]
162 public void VisualMapRelativePosition()
164 tlog.Debug(tag, $"VisualMapRelativePosition START");
166 var testingTarget = new VisualMap();
167 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
168 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
170 testingTarget.RelativePosition = new RelativeVector2(0.5f, 0.5f);
171 Assert.AreEqual(0.5f, testingTarget.RelativePosition.X, "Retrieved VisualSize.RelativePosition.X should be equal to set value");
172 Assert.AreEqual(0.5f, testingTarget.RelativePosition.Y, "Retrieved VisualSize.RelativePosition.Y should be equal to set value");
174 testingTarget.Dispose();
175 tlog.Debug(tag, $"VisualMapRelativePosition END (OK)");
180 [Description("VisualMap RelativeSize.")]
181 [Property("SPEC", "Tizen.NUI.VisualMap.RelativeSize A")]
182 [Property("SPEC_URL", "-")]
183 [Property("CRITERIA", "PRW")]
184 [Property("AUTHOR", "guowei.wang@samsung.com")]
185 public void VisualMapRelativeSize()
187 tlog.Debug(tag, $"VisualMapRelativeSize START");
189 var testingTarget = new VisualMap();
190 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
191 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
193 testingTarget.RelativeSize = new RelativeVector2(0.5f, 0.5f);
194 Assert.AreEqual(0.5f, testingTarget.RelativeSize.X, "Retrieved VisualSize.RelativeSize.X should be equal to set value");
195 Assert.AreEqual(0.5f, testingTarget.RelativeSize.Y, "Retrieved VisualSize.RelativeSize.Y should be equal to set value");
197 testingTarget.Dispose();
198 tlog.Debug(tag, $"VisualMapRelativeSize END (OK)");
203 [Description("VisualMap Shader.")]
204 [Property("SPEC", "Tizen.NUI.VisualMap.Shader A")]
205 [Property("SPEC_URL", "-")]
206 [Property("CRITERIA", "PRW")]
207 [Property("AUTHOR", "guowei.wang@samsung.com")]
208 public void VisualMapShader()
210 tlog.Debug(tag, $"VisualMapShader START");
212 using (PropertyMap propertyMap = new PropertyMap())
214 propertyMap.Insert(Visual.ShaderProperty.FragmentShader, new PropertyValue("Foobar"));
216 var testingTarget = new VisualMap();
217 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
218 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
220 testingTarget.Shader = propertyMap;
223 (testingTarget.Shader.Find(Visual.ShaderProperty.FragmentShader)).Get(out str);
224 Assert.AreEqual("Foobar", str, "Retrieved PremultipliedAlpha should be equal to set value");
226 testingTarget.Dispose();
229 tlog.Debug(tag, $"VisualMapShader END (OK)");
234 [Description("VisualMap Offset.")]
235 [Property("SPEC", "Tizen.NUI.VisualMap.Position A")]
236 [Property("SPEC_URL", "-")]
237 [Property("CRITERIA", "PRW")]
238 [Property("AUTHOR", "guowei.wang@samsung.com")]
239 public void VisualMapPosition()
241 tlog.Debug(tag, $"VisualMapPosition START");
243 var testingTarget = new VisualMap();
244 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
245 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
247 using (Vector2 vector2 = new Vector2(1.0f, 1.0f))
249 testingTarget.Position = vector2;
250 Assert.AreEqual(1.0f, testingTarget.Position.X, "Retrieved Offset.X should be equal to set value");
251 Assert.AreEqual(1.0f, testingTarget.Position.Y, "Retrieved Offset.Y should be equal to set value");
254 testingTarget.Dispose();
255 tlog.Debug(tag, $"VisualMapPosition END (OK)");
260 [Description("VisualMap PositionPolicy.")]
261 [Property("SPEC", "Tizen.NUI.VisualMap.PositionPolicy A")]
262 [Property("SPEC_URL", "-")]
263 [Property("CRITERIA", "PRW")]
264 [Property("AUTHOR", "guowei.wang@samsung.com")]
265 public void VisualMapPositionPolicy()
267 tlog.Debug(tag, $"VisualMapPositionPolicy START");
269 var testingTarget = new VisualMap();
270 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
271 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
273 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicy, "Retrieved PositionPolicy should be equal to set value");
275 testingTarget.PositionPolicy = VisualTransformPolicyType.Absolute;
276 Assert.AreEqual(VisualTransformPolicyType.Absolute, testingTarget.PositionPolicy, "Retrieved PositionPolicy should be equal to set value");
278 testingTarget.PositionPolicy = VisualTransformPolicyType.Relative;
279 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicy, "Retrieved PositionPolicy should be equal to set value");
281 testingTarget.Dispose();
282 tlog.Debug(tag, $"VisualMapPositionPolicy END (OK)");
287 [Description("VisualMap PositionPolicyX.")]
288 [Property("SPEC", "Tizen.NUI.VisualMap.PositionPolicyX A")]
289 [Property("SPEC_URL", "-")]
290 [Property("CRITERIA", "PRW")]
291 [Property("AUTHOR", "guowei.wang@samsung.com")]
292 public void VisualMapPositionPolicyX()
294 tlog.Debug(tag, $"VisualMapPositionPolicyX START");
296 var testingTarget = new VisualMap();
297 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
298 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
300 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicyX, "Retrieved PositionPolicyX should be equal to set value");
302 testingTarget.PositionPolicyX = VisualTransformPolicyType.Absolute;
303 Assert.AreEqual(VisualTransformPolicyType.Absolute, testingTarget.PositionPolicyX, "Retrieved PositionPolicyX should be equal to set value");
305 testingTarget.PositionPolicyX = VisualTransformPolicyType.Relative;
306 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicyX, "Retrieved PositionPolicyX should be equal to set value");
308 testingTarget.Dispose();
309 tlog.Debug(tag, $"VisualMapPositionPolicyX END (OK)");
314 [Description("VisualMap PositionPolicyY.")]
315 [Property("SPEC", "Tizen.NUI.VisualMap.PositionPolicyY A")]
316 [Property("SPEC_URL", "-")]
317 [Property("CRITERIA", "PRW")]
318 [Property("AUTHOR", "guowei.wang@samsung.com")]
319 public void VisualMapPositionPolicyY()
321 tlog.Debug(tag, $"VisualMapPositionPolicyY START");
323 var testingTarget = new VisualMap();
324 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
325 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
327 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicyY, "Retrieved PositionPolicyY should be equal to set value");
329 testingTarget.PositionPolicyY = VisualTransformPolicyType.Absolute;
330 Assert.AreEqual(VisualTransformPolicyType.Absolute, testingTarget.PositionPolicyY, "Retrieved PositionPolicyY should be equal to set value");
332 testingTarget.PositionPolicyY = VisualTransformPolicyType.Relative;
333 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicyY, "Retrieved PositionPolicyY should be equal to set value");
335 testingTarget.Dispose();
336 tlog.Debug(tag, $"VisualMapPositionPolicyY END (OK)");
341 [Description("VisualMap SizePolicy.")]
342 [Property("SPEC", "Tizen.NUI.VisualMap.SizePolicy A")]
343 [Property("SPEC_URL", "-")]
344 [Property("CRITERIA", "PRW")]
345 [Property("AUTHOR", "guowei.wang@samsung.com")]
346 public void VisualMapSizePolicy()
348 tlog.Debug(tag, $"VisualMapSizePolicy START");
350 var testingTarget = new VisualMap();
351 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
352 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
354 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicy, "Retrieved SizePolicy should be equal to set value");
356 testingTarget.SizePolicy = VisualTransformPolicyType.Absolute;
357 Assert.AreEqual(VisualTransformPolicyType.Absolute, testingTarget.SizePolicy, "Retrieved SizePolicy should be equal to set value");
359 testingTarget.SizePolicy = VisualTransformPolicyType.Relative;
360 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicy, "Retrieved SizePolicy should be equal to set value");
362 testingTarget.Dispose();
363 tlog.Debug(tag, $"VisualMapSizePolicy END (OK)");
368 [Description("VisualMap SizePolicyWidth.")]
369 [Property("SPEC", "Tizen.NUI.VisualMap.SizePolicyWidth A")]
370 [Property("SPEC_URL", "-")]
371 [Property("CRITERIA", "PRW")]
372 [Property("AUTHOR", "guowei.wang@samsung.com")]
373 public void VisualMapSizePolicyWidth()
375 tlog.Debug(tag, $"VisualMapSizePolicyWidth START");
377 var testingTarget = new VisualMap();
378 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
379 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
381 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicyWidth, "Retrieved SizePolicyWidth should be equal to set value");
383 testingTarget.SizePolicyWidth = VisualTransformPolicyType.Absolute;
384 Assert.AreEqual(VisualTransformPolicyType.Absolute, testingTarget.SizePolicyWidth, "Retrieved SizePolicyWidth should be equal to set value");
386 testingTarget.SizePolicyWidth = VisualTransformPolicyType.Relative;
387 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicyWidth, "Retrieved SizePolicyWidth should be equal to set value");
389 testingTarget.Dispose();
390 tlog.Debug(tag, $"VisualMapSizePolicyWidth END (OK)");
395 [Description("VisualMap SizePolicyHeight.")]
396 [Property("SPEC", "Tizen.NUI.VisualMap.SizePolicyHeight A")]
397 [Property("SPEC_URL", "-")]
398 [Property("CRITERIA", "PRW")]
399 [Property("AUTHOR", "guowei.wang@samsung.com")]
400 public void VisualMapSizePolicyHeight()
402 tlog.Debug(tag, $"VisualMapSizePolicyHeight START");
404 var testingTarget = new VisualMap();
405 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
406 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
408 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicyHeight, "Retrieved SizePolicyHeight should be equal to set value");
410 testingTarget.SizePolicyHeight = VisualTransformPolicyType.Absolute;
411 Assert.AreEqual(VisualTransformPolicyType.Absolute, testingTarget.SizePolicyHeight, "Retrieved SizePolicyHeight should be equal to set value");
413 testingTarget.SizePolicyHeight = VisualTransformPolicyType.Relative;
414 Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicyHeight, "Retrieved SizePolicyHeight should be equal to set value");
416 testingTarget.Dispose();
417 tlog.Debug(tag, $"VisualMapSizePolicyHeight END (OK)");
422 [Description("VisualMap Origin.")]
423 [Property("SPEC", "Tizen.NUI.VisualMap.Origin A")]
424 [Property("SPEC_URL", "-")]
425 [Property("CRITERIA", "PRW")]
426 [Property("AUTHOR", "guowei.wang@.samsung.com")]
427 public void VisualMapOrigin()
429 tlog.Debug(tag, $"VisualMapOrigin START");
431 var testingTarget = new VisualMap();
432 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
433 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
435 testingTarget.Origin = Visual.AlignType.Center;
436 Assert.AreEqual(Visual.AlignType.Center, testingTarget.Origin, "Retrieved Origin should be equal to set value");
438 testingTarget.Dispose();
439 tlog.Debug(tag, $"VisualMapOrigin END (OK)");
444 [Description("VisualMap AnchorPoint.")]
445 [Property("SPEC", "Tizen.NUI.VisualMap.AnchorPoint A")]
446 [Property("SPEC_URL", "-")]
447 [Property("CRITERIA", "PRW")]
448 [Property("AUTHOR", "guowei.wang@samsung.com")]
449 public void VisualMapAnchorPoint()
451 tlog.Debug(tag, $"VisualMapAnchorPoint START");
453 var testingTarget = new VisualMap();
454 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
455 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
457 testingTarget.AnchorPoint = Visual.AlignType.Center;
458 Assert.AreEqual(Visual.AlignType.Center, testingTarget.AnchorPoint, "Retrieved PivotPoint should be equal to set value");
460 testingTarget.Dispose();
461 tlog.Debug(tag, $"VisualMapAnchorPoint END (OK)");
466 [Description("VisualMap DepthIndex.")]
467 [Property("SPEC", "Tizen.NUI.VisualMap.DepthIndex A")]
468 [Property("SPEC_URL", "-")]
469 [Property("CRITERIA", "PRW")]
470 [Property("AUTHOR", "guowei.wang@samsung.com")]
471 public void VisualMapDepthIndex()
473 tlog.Debug(tag, $"VisualMapDepthIndex START");
475 var testingTarget = new VisualMap();
476 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
477 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
479 testingTarget.DepthIndex = 1;
480 Assert.AreEqual(1, testingTarget.DepthIndex, "Retrieved DepthIndex should be equal to set value");
482 testingTarget.Dispose();
483 tlog.Debug(tag, $"VisualMapDepthIndex END (OK)");
488 [Description("VisualMap OutputTransformMap.")]
489 [Property("SPEC", "Tizen.NUI.VisualMap.OutputTransformMap A")]
490 [Property("SPEC_URL", "-")]
491 [Property("CRITERIA", "PRO")]
492 [Property("AUTHOR", "guowei.wang@samsung.com")]
493 public void VisualMapOutputTransformMap()
495 tlog.Debug(tag, $"VisualMapOutputTransformMap START");
497 var testingTarget = new VisualMap();
498 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
499 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
501 using (Vector2 vector2 = new Vector2(1.0f, 1.0f))
503 testingTarget.Size = vector2;
504 testingTarget.Position = vector2;
505 testingTarget.PositionPolicy = VisualTransformPolicyType.Absolute;
506 testingTarget.SizePolicy = VisualTransformPolicyType.Absolute;
507 testingTarget.Origin = Visual.AlignType.Center;
508 testingTarget.AnchorPoint = Visual.AlignType.Center;
510 var result = testingTarget.OutputTransformMap;
511 Assert.IsNotNull(result, "Can't create success object VisualMap");
512 Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
514 result.Find((int)VisualTransformPropertyType.Size).Get(vector2);
515 Assert.AreEqual(1.0f, vector2.X, "Retrieved VisualSize.X should be equal to set value");
516 Assert.AreEqual(1.0f, vector2.Y, "Retrieved VisualSize.Y should be equal to set value");
517 result.Find((int)VisualTransformPropertyType.Offset).Get(vector2);
518 Assert.AreEqual(1.0f, vector2.X, "Retrieved Offset.X should be equal to set value");
519 Assert.AreEqual(1.0f, vector2.Y, "Retrieved Offset.Y should be equal to set value");
520 result.Find((int)VisualTransformPropertyType.OffsetPolicy).Get(vector2);
521 Assert.AreEqual(1.0f, vector2.X, "Retrieved OffsetPolicy.X should be equal to set value");
522 Assert.AreEqual(1.0f, vector2.Y, "Retrieved OffsetPolicy.Y should be equal to set value");
523 result.Find((int)VisualTransformPropertyType.SizePolicy).Get(vector2);
524 Assert.AreEqual(1.0f, vector2.X, "Retrieved SizePolicy.X should be equal to set value");
525 Assert.AreEqual(1.0f, vector2.Y, "Retrieved SizePolicy.Y should be equal to set value");
528 result.Find((int)VisualTransformPropertyType.Origin).Get(out type);
529 Assert.AreEqual((int)Visual.AlignType.Center, type, "Retrieved Origin should be equal to set value");
530 result.Find((int)VisualTransformPropertyType.AnchorPoint).Get(out type);
531 Assert.AreEqual((int)Visual.AlignType.Center, type, "Retrieved AnchorPoint should be equal to set value");
534 testingTarget.Dispose();
535 tlog.Debug(tag, $"VisualMapOutputTransformMap END (OK)");
540 [Description("VisualMap OutputVisualMap.")]
541 [Property("SPEC", "Tizen.NUI.VisualMap.OutputVisualMap A")]
542 [Property("SPEC_URL", "-")]
543 [Property("CRITERIA", "PRO")]
544 [Property("AUTHOR", "guowei.wang@samsung.com")]
545 public void VisualMapOutputVisualMap()
547 tlog.Debug(tag, $"VisualMapOutputVisualMap START");
549 var testingTarget = new VisualMap();
550 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
551 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
553 var result = testingTarget.OutputVisualMap;
554 Assert.IsNotNull(result, "Should not be null");
556 testingTarget.Dispose();
557 tlog.Debug(tag, $"VisualMapOutputVisualMap END (OK)");
562 [Description("VisualMap VisualFittingMode.")]
563 [Property("SPEC", "Tizen.NUI.VisualMap.VisualFittingMode A")]
564 [Property("SPEC_URL", "-")]
565 [Property("CRITERIA", "PRW")]
566 [Property("AUTHOR", "guowei.wang@samsung.com")]
567 public void VisualMapVisualFittingMode()
569 tlog.Debug(tag, $"VisualMapVisualFittingMode START");
571 var testingTarget = new VisualMap();
572 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
573 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
575 testingTarget.VisualFittingMode = VisualFittingModeType.Fill;
576 Assert.AreEqual(VisualFittingModeType.Fill, testingTarget.VisualFittingMode, "Retrieved VisualFittingMode should be equal to set value");
578 testingTarget.VisualFittingMode = VisualFittingModeType.FitKeepAspectRatio;
579 Assert.AreEqual(VisualFittingModeType.FitKeepAspectRatio, testingTarget.VisualFittingMode, "Retrieved VisualFittingMode should be equal to set value");
581 testingTarget.Dispose();
582 tlog.Debug(tag, $"VisualMapVisualFittingMode END (OK)");
587 [Description("VisualMap CornerRadius.")]
588 [Property("SPEC", "Tizen.NUI.VisualMap.CornerRadius A")]
589 [Property("SPEC_URL", "-")]
590 [Property("CRITERIA", "PRW")]
591 [Property("AUTHOR", "guowei.wang@samsung.com")]
592 public void VisualMapCornerRadius()
594 tlog.Debug(tag, $"VisualMapCornerRadius START");
596 var testingTarget = new VisualMap();
597 Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
598 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
600 testingTarget.CornerRadius = new Vector4(1.0f, 1.0f, 1.0f, 1.0f);
602 Assert.AreEqual(1.0f, testingTarget.CornerRadius.X);
603 Assert.AreEqual(1.0f, testingTarget.CornerRadius.Y);
604 Assert.AreEqual(1.0f, testingTarget.CornerRadius.Z);
605 Assert.AreEqual(1.0f, testingTarget.CornerRadius.W);
607 testingTarget.Dispose();
608 tlog.Debug(tag, $"VisualMapCornerRadius END (OK)");
613 [Description("VisualMap ComposingPropertyMap.")]
614 [Property("SPEC", "Tizen.NUI.VisualMap.ComposingPropertyMap M")]
615 [Property("SPEC_URL", "-")]
616 [Property("CRITERIA", "MR")]
617 [Property("AUTHOR", "guowei.wang@samsung.com")]
618 public void VisualMapComposingPropertyMap()
620 tlog.Debug(tag, $"VisualMapComposingPropertyMap START");
622 flagComposingPropertyMap = false;
623 Assert.False(flagComposingPropertyMap, "flagComposingPropertyMap should false initial");
625 var testingTarget = new MyVisualMap();
626 Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
628 PropertyMap propertyMap = testingTarget.OutputVisualMap;
629 Assert.AreEqual(0, propertyMap.Count(), "Retrieved PropertyMap count should be 0");
630 Assert.True(flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
632 testingTarget.Dispose();
633 tlog.Debug(tag, $"VisualMapComposingPropertyMap END (OK)");