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.")]
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 TextShadowConstructor()
40 tlog.Debug(tag, $"TextShadowConstructor START");
42 using (Vector2 vector = new Vector2(1.5f, 3.0f))
44 var testingTarget = new TextShadow(Color.Cyan, vector, 0.3f);
45 Assert.IsNotNull(testingTarget, "Can't create success object TextShadow");
46 Assert.IsInstanceOf<TextShadow>(testingTarget, "Should be an instance of TextShadow type.");
48 testingTarget.Dispose();
51 tlog.Debug(tag, $"TextShadowConstructor END (OK)");
56 [Description("TextShadow constructor. With TextShadow.")]
57 [Property("SPEC", "Tizen.NUI.TextShadow.TextShadow C")]
58 [Property("SPEC_URL", "-")]
59 [Property("CRITERIA", "CONSTR")]
60 [Property("AUTHOR", "guowei.wang@samsung.com")]
61 public void TextShadowConstructorWithTextShadow()
63 tlog.Debug(tag, $"TextShadowConstructorWithTextShadow START");
65 using (Vector2 vector = new Vector2(1.5f, 3.0f))
67 using (TextShadow shadow = new TextShadow(Color.Cyan, vector, 0.3f))
71 var testingTarget = new TextShadow(shadow);
72 testingTarget.Dispose();
76 tlog.Debug(tag, e.Message.ToString());
77 Assert.Fail("Caught Exception: Failed!");
83 tlog.Debug(tag, $"TextShadowConstructorWithTextShadow END (OK)");
88 [Description("TextShadow constructor. With PropertyMap.")]
89 [Property("SPEC", "Tizen.NUI.TextShadow.TextShadow C")]
90 [Property("SPEC_URL", "-")]
91 [Property("CRITERIA", "CONSTR")]
92 [Property("AUTHOR", "guowei.wang@samsung.com")]
93 public void TextShadowConstructorWithPropertyMap()
95 tlog.Debug(tag, $"TextShadowConstructorWithPropertyMap START");
97 TextLabel textLabel = new TextLabel()
99 Text = "TextShadowConstructor",
103 PropertyMap temp = new PropertyMap();
104 Tizen.NUI.Object.GetProperty((global::System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
106 var testingTarget = new TextShadow(temp);
107 Assert.IsNotNull(testingTarget, "Can't create success object TextShadow");
108 Assert.IsInstanceOf<TextShadow>(testingTarget, "Should be an instance of TextShadow type.");
111 testingTarget.Dispose();
112 tlog.Debug(tag, $"TextShadowConstructorWithPropertyMap END (OK)");
117 [Description("TextShadow Clone.")]
118 [Property("SPEC", "Tizen.NUI.TextShadow.Clone M")]
119 [Property("SPEC_URL", "-")]
120 [Property("CRITERIA", "MR")]
121 [Property("AUTHOR", "guowei.wang@samsung.com")]
122 public void TextShadowClone()
124 tlog.Debug(tag, $"TextShadowClone START");
126 using (Vector2 vector = new Vector2(1.5f, 3.0f))
128 using (TextShadow textShadow = new TextShadow(Color.Cyan, vector, 0.3f))
136 tlog.Debug(tag, e.Message.ToString());
137 Assert.Fail("Caught Exception: Failed!");
142 tlog.Debug(tag, $"TextShadowClone END (OK)");
147 [Description("TextShadow Clone. With TextShadow.")]
148 [Property("SPEC", "Tizen.NUI.TextShadow.Clone M")]
149 [Property("SPEC_URL", "-")]
150 [Property("CRITERIA", "MR")]
151 [Property("AUTHOR", "guowei.wang@samsung.com")]
152 public void TextShadowCloneWithTextShadow()
154 tlog.Debug(tag, $"TextShadowCloneWithTextShadow START");
156 TextLabel textLabel = new TextLabel()
158 Text = "TextShadowConstructor",
162 PropertyMap temp = new PropertyMap();
163 Tizen.NUI.Object.GetProperty((global::System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
167 TextShadow.Clone(new TextShadow(temp));
171 tlog.Debug(tag, e.Message.ToString());
172 Assert.Fail("Caught Exception: Failed!");
176 tlog.Debug(tag, $"TextShadowCloneWithTextShadow END (OK)");
181 [Description("TextShadow Clone. With null TextShadow.")]
182 [Property("SPEC", "Tizen.NUI.TextShadow.Clone M")]
183 [Property("SPEC_URL", "-")]
184 [Property("CRITERIA", "MR")]
185 [Property("AUTHOR", "guowei.wang@samsung.com")]
186 public void TextShadowCloneWithNullTextShadow()
188 tlog.Debug(tag, $"TextShadowCloneWithNullTextShadow START");
190 TextShadow textShadow = null;
191 var testingTarget = TextShadow.Clone(textShadow);
192 Assert.IsNull(testingTarget);
194 tlog.Debug(tag, $"TextShadowCloneWithNullTextShadow END (OK)");
199 [Description("TextShadow ToPropertyValue.")]
200 [Property("SPEC", "Tizen.NUI.TextShadow.ToPropertyValue M")]
201 [Property("SPEC_URL", "-")]
202 [Property("CRITERIA", "MR")]
203 [Property("AUTHOR", "guowei.wang@samsung.com")]
204 public void TextShadowToPropertyValue()
206 tlog.Debug(tag, $"TextShadowToPropertyValue START");
208 TextLabel textLabel = new TextLabel()
210 Text = "TextShadowConstructor",
214 PropertyMap temp = new PropertyMap();
215 Tizen.NUI.Object.GetProperty((global::System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
217 using (TextShadow textShadow = new TextShadow(temp))
220 var testingTarget = TextShadow.ToPropertyValue(textShadow);
221 Assert.IsNotNull(testingTarget, "Can't create success object PropertyValue");
222 Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an instance of PropertyValue type.");
224 testingTarget.Dispose();
228 tlog.Debug(tag, $"TextShadowToPropertyValue END (OK)");
233 [Description("TextShadow ToPropertyValue. Instance is null.")]
234 [Property("SPEC", "Tizen.NUI.TextShadow.ToPropertyValue M")]
235 [Property("SPEC_URL", "-")]
236 [Property("CRITERIA", "MR")]
237 [Property("AUTHOR", "guowei.wang@samsung.com")]
238 public void TextShadowToPropertyValueWithNullInstance()
240 tlog.Debug(tag, $"TextShadowToPropertyValueWithNullInstance START");
242 var testingTarget = TextShadow.ToPropertyValue(null);
243 Assert.IsNotNull(testingTarget, "Can't create success object PropertyValue");
244 Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an instance of PropertyValue type.");
246 testingTarget.Dispose();
247 tlog.Debug(tag, $"TextShadowToPropertyValueWithNullInstance END (OK)");