3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Collections.Generic;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("public/BaseComponents/TextConstants")]
14 public class PublicTextConstantsTest
16 private const string tag = "NUITEST";
21 tlog.Info(tag, "Init() is called!");
27 tlog.Info(tag, "Destroy() is called!");
32 [Description("InputFilter Equals")]
33 [Property("SPEC", "Tizen.NUI.Text.InputFilter.Equals M")]
34 [Property("SPEC_URL", "-")]
35 [Property("CRITERIA", "MR")]
36 [Property("AUTHOR", "bowon.ryu@samsung.com")]
37 public void InputFilterEquals()
39 tlog.Debug(tag, $"InputFilterEquals START");
41 var inputFilter = new Tizen.NUI.Text.InputFilter();
42 Assert.IsNotNull(inputFilter, "Can't create success object inputFilter");
43 Assert.IsInstanceOf<Tizen.NUI.Text.InputFilter>(inputFilter, "Should be an instance of inputFilter type.");
45 var compare = new Tizen.NUI.Text.InputFilter();
46 Assert.IsTrue(inputFilter == compare, "Should be true!");
47 Assert.AreEqual(inputFilter.GetHashCode(), compare.GetHashCode(), "Should be true!");
49 compare.Accepted = @"[\d]";
50 Assert.IsTrue(inputFilter != compare, "Should be true!");
52 tlog.Debug(tag, $"InputFilterEquals END (OK)");
57 [Description("Strikethrough Equals")]
58 [Property("SPEC", "Tizen.NUI.Text.Strikethrough.Equals M")]
59 [Property("SPEC_URL", "-")]
60 [Property("CRITERIA", "MR")]
61 [Property("AUTHOR", "bowon.ryu@samsung.com")]
62 public void StrikethroughEquals()
64 tlog.Debug(tag, $"StrikethroughEquals START");
66 var strikethrough = new Tizen.NUI.Text.Strikethrough();
67 Assert.IsNotNull(strikethrough, "Can't create success object strikethrough");
68 Assert.IsInstanceOf<Tizen.NUI.Text.Strikethrough>(strikethrough, "Should be an instance of strikethrough type.");
70 var compare = new Tizen.NUI.Text.Strikethrough();
71 Assert.IsTrue(strikethrough == compare, "Should be true!");
72 Assert.AreEqual(strikethrough.GetHashCode(), compare.GetHashCode(), "Should be true!");
74 compare.Height = 2.0f;
75 Assert.IsTrue(strikethrough != compare, "Should be true!");
77 tlog.Debug(tag, $"StrikethroughEquals END (OK)");
82 [Description("FontStyle Equals")]
83 [Property("SPEC", "Tizen.NUI.Text.FontStyle.Equals M")]
84 [Property("SPEC_URL", "-")]
85 [Property("CRITERIA", "MR")]
86 [Property("AUTHOR", "bowon.ryu@samsung.com")]
87 public void FontStyleEquals()
89 tlog.Debug(tag, $"FontStyleEquals START");
91 var fontStyle = new Tizen.NUI.Text.FontStyle();
92 Assert.IsNotNull(fontStyle, "Can't create success object strikethrough");
93 Assert.IsInstanceOf<Tizen.NUI.Text.FontStyle>(fontStyle, "Should be an instance of fontStyle type.");
95 var compare = new Tizen.NUI.Text.FontStyle();
96 Assert.IsTrue(fontStyle == compare, "Should be true!");
97 Assert.AreEqual(fontStyle.GetHashCode(), compare.GetHashCode(), "Should be true!");
99 compare.Slant = FontSlantType.Italic;
100 Assert.IsTrue(fontStyle != compare, "Should be true!");
102 tlog.Debug(tag, $"FontStyleEquals END (OK)");
107 [Description("Underline Equals")]
108 [Property("SPEC", "Tizen.NUI.Text.Underline.Equals M")]
109 [Property("SPEC_URL", "-")]
110 [Property("CRITERIA", "MR")]
111 [Property("AUTHOR", "bowon.ryu@samsung.com")]
112 public void UnderlineEquals()
114 tlog.Debug(tag, $"UnderlineEquals START");
116 var underline = new Tizen.NUI.Text.Underline();
117 Assert.IsNotNull(underline, "Can't create success object strikethrough");
118 Assert.IsInstanceOf<Tizen.NUI.Text.Underline>(underline, "Should be an instance of underline type.");
120 var compare = new Tizen.NUI.Text.Underline();
121 Assert.IsTrue(underline == compare, "Should be true!");
122 Assert.AreEqual(underline.GetHashCode(), compare.GetHashCode(), "Should be true!");
124 compare.Color = Color.Red;
125 Assert.IsTrue(underline != compare, "Should be true!");
127 tlog.Debug(tag, $"UnderlineEquals END (OK)");
132 [Description("Shadow Equals")]
133 [Property("SPEC", "Tizen.NUI.Text.Shadow.Equals M")]
134 [Property("SPEC_URL", "-")]
135 [Property("CRITERIA", "MR")]
136 [Property("AUTHOR", "bowon.ryu@samsung.com")]
137 public void ShadowEquals()
139 tlog.Debug(tag, $"ShadowEquals START");
141 var shadow = new Tizen.NUI.Text.Shadow();
142 Assert.IsNotNull(shadow, "Can't create success object strikethrough");
143 Assert.IsInstanceOf<Tizen.NUI.Text.Shadow>(shadow, "Should be an instance of shadow type.");
145 var compare = new Tizen.NUI.Text.Shadow();
146 Assert.IsTrue(shadow == compare, "Should be true!");
147 Assert.AreEqual(shadow.GetHashCode(), compare.GetHashCode(), "Should be true!");
149 compare.BlurRadius = 5.0f;
150 Assert.IsTrue(shadow != compare, "Should be true!");
152 tlog.Debug(tag, $"ShadowEquals END (OK)");
157 [Description("Outline Equals")]
158 [Property("SPEC", "Tizen.NUI.Text.Outline.Equals M")]
159 [Property("SPEC_URL", "-")]
160 [Property("CRITERIA", "MR")]
161 [Property("AUTHOR", "bowon.ryu@samsung.com")]
162 public void OutlineEquals()
164 tlog.Debug(tag, $"OutlineEquals START");
166 var outline = new Tizen.NUI.Text.Outline();
167 Assert.IsNotNull(outline, "Can't create success object strikethrough");
168 Assert.IsInstanceOf<Tizen.NUI.Text.Outline>(outline, "Should be an instance of outline type.");
170 var compare = new Tizen.NUI.Text.Outline();
171 Assert.IsTrue(outline == compare, "Should be true!");
172 Assert.AreEqual(outline.GetHashCode(), compare.GetHashCode(), "Should be true!");
174 compare.Width = 2.0f;
175 Assert.IsTrue(outline != compare, "Should be true!");
177 tlog.Debug(tag, $"OutlineEquals END (OK)");
182 [Description("TextFit Equals")]
183 [Property("SPEC", "Tizen.NUI.Text.TextFit.Equals M")]
184 [Property("SPEC_URL", "-")]
185 [Property("CRITERIA", "MR")]
186 [Property("AUTHOR", "bowon.ryu@samsung.com")]
187 public void TextFitEquals()
189 tlog.Debug(tag, $"TextFitEquals START");
191 var textFit = new Tizen.NUI.Text.TextFit();
192 Assert.IsNotNull(textFit, "Can't create success object strikethrough");
193 Assert.IsInstanceOf<Tizen.NUI.Text.TextFit>(textFit, "Should be an instance of textFit type.");
195 var compare = new Tizen.NUI.Text.TextFit();
196 Assert.IsTrue(textFit == compare, "Should be true!");
197 Assert.AreEqual(textFit.GetHashCode(), compare.GetHashCode(), "Should be true!");
199 compare.StepSize = 10.0f;
200 Assert.IsTrue(textFit != compare, "Should be true!");
202 tlog.Debug(tag, $"TextFitEquals END (OK)");
207 [Description("Placeholder Equals")]
208 [Property("SPEC", "Tizen.NUI.Text.Placeholder.Equals M")]
209 [Property("SPEC_URL", "-")]
210 [Property("CRITERIA", "MR")]
211 [Property("AUTHOR", "bowon.ryu@samsung.com")]
212 public void PlaceholderEquals()
214 tlog.Debug(tag, $"PlaceholderEquals START");
216 var placeholder = new Tizen.NUI.Text.Placeholder();
217 Assert.IsNotNull(placeholder, "Can't create success object strikethrough");
218 Assert.IsInstanceOf<Tizen.NUI.Text.Placeholder>(placeholder, "Should be an instance of placeholder type.");
220 var compare = new Tizen.NUI.Text.Placeholder();
221 Assert.IsTrue(placeholder == compare, "Should be true!");
222 Assert.AreEqual(placeholder.GetHashCode(), compare.GetHashCode(), "Should be true!");
224 compare.Ellipsis = true;
225 Assert.IsTrue(placeholder != compare, "Should be true!");
227 tlog.Debug(tag, $"PlaceholderEquals END (OK)");
232 [Description("HiddenInput Equals")]
233 [Property("SPEC", "Tizen.NUI.Text.HiddenInput.Equals M")]
234 [Property("SPEC_URL", "-")]
235 [Property("CRITERIA", "MR")]
236 [Property("AUTHOR", "bowon.ryu@samsung.com")]
237 public void HiddenInputEquals()
239 tlog.Debug(tag, $"HiddenInputEquals START");
241 var hiddenInput = new Tizen.NUI.Text.HiddenInput();
242 Assert.IsNotNull(hiddenInput, "Can't create success object strikethrough");
243 Assert.IsInstanceOf<Tizen.NUI.Text.HiddenInput>(hiddenInput, "Should be an instance of hiddenInput type.");
245 var compare = new Tizen.NUI.Text.HiddenInput();
246 Assert.IsTrue(hiddenInput == compare, "Should be true!");
247 Assert.AreEqual(hiddenInput.GetHashCode(), compare.GetHashCode(), "Should be true!");
249 compare.ShowLastCharacterDuration = 10000;
250 Assert.IsTrue(hiddenInput != compare, "Should be true!");
252 tlog.Debug(tag, $"HiddenInputEquals END (OK)");
257 [Description("SelectionHandleImage Equals")]
258 [Property("SPEC", "Tizen.NUI.Text.SelectionHandleImage.Equals M")]
259 [Property("SPEC_URL", "-")]
260 [Property("CRITERIA", "MR")]
261 [Property("AUTHOR", "bowon.ryu@samsung.com")]
262 public void SelectionHandleImageEquals()
264 tlog.Debug(tag, $"SelectionHandleImageEquals START");
266 var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage();
267 Assert.IsNotNull(selectionHandleImage, "Can't create success object strikethrough");
268 Assert.IsInstanceOf<Tizen.NUI.Text.SelectionHandleImage>(selectionHandleImage, "Should be an instance of selectionHandleImage type.");
270 var compare = new Tizen.NUI.Text.SelectionHandleImage();
271 Assert.IsTrue(selectionHandleImage == compare, "Should be true!");
272 Assert.AreEqual(selectionHandleImage.GetHashCode(), compare.GetHashCode(), "Should be true!");
274 compare.LeftImageUrl = "left image url";
275 Assert.IsTrue(selectionHandleImage != compare, "Should be true!");
277 tlog.Debug(tag, $"SelectionHandleImageEquals END (OK)");