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;
9 namespace Tizen.NUI.Devel.Tests
11 using tlog = Tizen.Log;
14 [Description("public/ViewProperty/TextShadow.cs")]
15 public class PublicTextShadowTest
17 private const string tag = "NUITEST";
22 tlog.Info(tag, "Init() is called!");
28 tlog.Info(tag, "Destroy() is called!");
33 [Description("TextShadow constructor. With PropertyMap.")]
34 [Property("SPEC", "Tizen.NUI.TextShadow.TextShadow C")]
35 [Property("SPEC_URL", "-")]
36 [Property("CRITERIA", "CONSTR")]
37 [Property("AUTHOR", "guowei.wang@samsung.com")]
38 public void TextShadowConstructorWithPropertyMap()
40 tlog.Debug(tag, $"TextShadowConstructorWithPropertyMap START");
42 TextLabel textLabel = new TextLabel()
44 Text = "TextShadowConstructor",
48 PropertyMap temp = new PropertyMap();
49 Tizen.NUI.Object.GetProperty((global::System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
51 var testingTarget = new TextShadow(temp);
52 Assert.IsNotNull(testingTarget, "Can't create success object TextShadow");
53 Assert.IsInstanceOf<TextShadow>(testingTarget, "Should be an instance of TextShadow type.");
56 testingTarget.Dispose();
57 tlog.Debug(tag, $"TextShadowConstructorWithPropertyMap END (OK)");
62 [Description("TextShadow Clone.")]
63 [Property("SPEC", "Tizen.NUI.TextShadow.Clone M")]
64 [Property("SPEC_URL", "-")]
65 [Property("CRITERIA", "MR")]
66 [Property("AUTHOR", "guowei.wang@samsung.com")]
67 public void TextShadowClone()
69 tlog.Debug(tag, $"TextShadowClone START");
71 using (Vector2 vector = new Vector2(1.5f, 3.0f))
73 using (TextShadow textShadow = new TextShadow(Color.Cyan, vector, 0.3f))
81 tlog.Debug(tag, e.Message.ToString());
82 Assert.Fail("Caught Exception: Failed!");
87 tlog.Debug(tag, $"TextShadowClone END (OK)");
92 [Description("TextShadow Clone. With TextShadow.")]
93 [Property("SPEC", "Tizen.NUI.TextShadow.Clone M")]
94 [Property("SPEC_URL", "-")]
95 [Property("CRITERIA", "MR")]
96 [Property("AUTHOR", "guowei.wang@samsung.com")]
97 public void TextShadowCloneWithTextShadow()
99 tlog.Debug(tag, $"TextShadowCloneWithTextShadow START");
101 TextLabel textLabel = new TextLabel()
103 Text = "TextShadowConstructor",
107 PropertyMap temp = new PropertyMap();
108 Tizen.NUI.Object.GetProperty((global::System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
112 TextShadow.Clone(new TextShadow(temp));
116 tlog.Debug(tag, e.Message.ToString());
117 Assert.Fail("Caught Exception: Failed!");
121 tlog.Debug(tag, $"TextShadowCloneWithTextShadow END (OK)");
126 [Description("TextShadow Clone. With null TextShadow.")]
127 [Property("SPEC", "Tizen.NUI.TextShadow.Clone M")]
128 [Property("SPEC_URL", "-")]
129 [Property("CRITERIA", "MR")]
130 [Property("AUTHOR", "guowei.wang@samsung.com")]
131 public void TextShadowCloneWithNullTextShadow()
133 tlog.Debug(tag, $"TextShadowCloneWithNullTextShadow START");
135 TextShadow textShadow = null;
136 var testingTarget = TextShadow.Clone(textShadow);
137 Assert.IsNull(testingTarget);
139 tlog.Debug(tag, $"TextShadowCloneWithNullTextShadow END (OK)");
144 [Description("TextShadow ToPropertyValue.")]
145 [Property("SPEC", "Tizen.NUI.TextShadow.ToPropertyValue M")]
146 [Property("SPEC_URL", "-")]
147 [Property("CRITERIA", "MR")]
148 [Property("AUTHOR", "guowei.wang@samsung.com")]
149 public void TextShadowToPropertyValue()
151 tlog.Debug(tag, $"TextShadowToPropertyValue START");
153 TextLabel textLabel = new TextLabel()
155 Text = "TextShadowConstructor",
159 PropertyMap temp = new PropertyMap();
160 Tizen.NUI.Object.GetProperty((global::System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
162 using (TextShadow textShadow = new TextShadow(temp))
165 var testingTarget = TextShadow.ToPropertyValue(textShadow);
166 Assert.IsNotNull(testingTarget, "Can't create success object PropertyValue");
167 Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an instance of PropertyValue type.");
169 testingTarget.Dispose();
173 tlog.Debug(tag, $"TextShadowToPropertyValue END (OK)");
178 [Description("TextShadow ToPropertyValue. Instance is null.")]
179 [Property("SPEC", "Tizen.NUI.TextShadow.ToPropertyValue M")]
180 [Property("SPEC_URL", "-")]
181 [Property("CRITERIA", "MR")]
182 [Property("AUTHOR", "guowei.wang@samsung.com")]
183 public void TextShadowToPropertyValueWithNullInstance()
185 tlog.Debug(tag, $"TextShadowToPropertyValueWithNullInstance START");
187 var testingTarget = TextShadow.ToPropertyValue(null);
188 Assert.IsNotNull(testingTarget, "Can't create success object PropertyValue");
189 Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an instance of PropertyValue type.");
191 testingTarget.Dispose();
192 tlog.Debug(tag, $"TextShadowToPropertyValueWithNullInstance END (OK)");