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("internal/Common/Uint16Pair")]
13 public class InternalUint16PairTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("Uint16Pair constructor.")]
32 [Property("SPEC", "Tizen.NUI.Uint16Pair.Uint16Pair C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void Uint16PairConstructor()
38 tlog.Debug(tag, $"Uint16PairConstructor START");
40 using (Uint16Pair data = new Uint16Pair(1, 2))
42 var testingTarget = new Uint16Pair(data);
43 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
44 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
46 testingTarget.Dispose();
49 tlog.Debug(tag, $"Uint16PairConstructor END (OK)");
54 [Description("Uint16Pair SetWidth.")]
55 [Property("SPEC", "Tizen.NUI.Uint16Pair.SetWidth M")]
56 [Property("SPEC_URL", "-")]
57 [Property("CRITERIA", "MR")]
58 [Property("AUTHOR", "guowei.wang@samsung.com")]
59 public void Uint16PairSetWidth()
61 tlog.Debug(tag, $"Uint16PairSetWidth START");
63 var testingTarget = new Uint16Pair(1, 2);
64 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
65 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
69 testingTarget.SetWidth(2);
73 tlog.Debug(tag, e.Message.ToString());
74 Assert.Fail("Caught Exception : Failed!");
77 testingTarget.Dispose();
79 tlog.Debug(tag, $"Uint16PairSetWidth END (OK)");
84 [Description("Uint16Pair SetHeight.")]
85 [Property("SPEC", "Tizen.NUI.Uint16Pair.SetHeight M")]
86 [Property("SPEC_URL", "-")]
87 [Property("CRITERIA", "MR")]
88 [Property("AUTHOR", "guowei.wang@samsung.com")]
89 public void Uint16PairSetHeight()
91 tlog.Debug(tag, $"Uint16PairSetHeight START");
93 var testingTarget = new Uint16Pair(1, 2);
94 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
95 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
99 testingTarget.SetHeight(1);
103 tlog.Debug(tag, e.Message.ToString());
104 Assert.Fail("Caught Exception : Failed!");
107 testingTarget.Dispose();
109 tlog.Debug(tag, $"Uint16PairSetHeight END (OK)");
114 [Description("Uint16Pair SetX.")]
115 [Property("SPEC", "Tizen.NUI.Uint16Pair.SetX M")]
116 [Property("SPEC_URL", "-")]
117 [Property("CRITERIA", "MR")]
118 [Property("AUTHOR", "guowei.wang@samsung.com")]
119 public void Uint16PairSetX()
121 tlog.Debug(tag, $"Uint16PairSetX START");
123 var testingTarget = new Uint16Pair(1, 2);
124 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
125 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
129 testingTarget.SetX(2);
133 tlog.Debug(tag, e.Message.ToString());
134 Assert.Fail("Caught Exception : Failed!");
137 testingTarget.Dispose();
139 tlog.Debug(tag, $"Uint16PairSetX END (OK)");
144 [Description("Uint16Pair SetY.")]
145 [Property("SPEC", "Tizen.NUI.Uint16Pair.SetY M")]
146 [Property("SPEC_URL", "-")]
147 [Property("CRITERIA", "MR")]
148 [Property("AUTHOR", "guowei.wang@samsung.com")]
149 public void Uint16PairSetY()
151 tlog.Debug(tag, $"Uint16PairSetY START");
153 var testingTarget = new Uint16Pair(1, 2);
154 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
155 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
159 testingTarget.SetY(2);
163 tlog.Debug(tag, e.Message.ToString());
164 Assert.Fail("Caught Exception : Failed!");
167 testingTarget.Dispose();
169 tlog.Debug(tag, $"Uint16PairSetY END (OK)");
174 [Description("Uint16Pair Assign.")]
175 [Property("SPEC", "Tizen.NUI.Uint16Pair.Assign M")]
176 [Property("SPEC_URL", "-")]
177 [Property("CRITERIA", "MR")]
178 [Property("AUTHOR", "guowei.wang@samsung.com")]
179 public void Uint16PairAssign()
181 tlog.Debug(tag, $"Uint16PairAssign START");
183 using (Uint16Pair data = new Uint16Pair(1, 2))
185 var testingTarget = data.Assign(data);
186 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
187 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
189 testingTarget.Dispose();
192 tlog.Debug(tag, $"Uint16PairAssign END (OK)");
197 [Description("Uint16Pair <.")]
198 [Property("SPEC", "Tizen.NUI.Uint16Pair.LessThan M")]
199 [Property("SPEC_URL", "-")]
200 [Property("CRITERIA", "MR")]
201 [Property("AUTHOR", "guowei.wang@samsung.com")]
202 public void Uint16PairLessThan()
204 tlog.Debug(tag, $"Uint16PairLessThan START");
206 var testingTarget = new Uint16Pair(1, 2);
207 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
208 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
210 using (Uint16Pair obj = new Uint16Pair(1, 0))
212 var result = testingTarget < obj;
213 tlog.Debug(tag, result.ToString());
216 testingTarget.Dispose();
217 tlog.Debug(tag, $"Uint16PairLessThan END (OK)");
222 [Description("Uint16Pair >.")]
223 [Property("SPEC", "Tizen.NUI.Uint16Pair.LessThan M")]
224 [Property("SPEC_URL", "-")]
225 [Property("CRITERIA", "MR")]
226 [Property("AUTHOR", "guowei.wang@samsung.com")]
227 public void Uint16PairGreaterThan()
229 tlog.Debug(tag, $"Uint16PairGreaterThan START");
231 var testingTarget = new Uint16Pair(1, 2);
232 Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair");
233 Assert.IsInstanceOf<Uint16Pair>(testingTarget, "Should be an instance of Uint16Pair type.");
235 using (Uint16Pair obj = new Uint16Pair(1, 0))
237 var result = testingTarget > obj;
238 tlog.Debug(tag, result.ToString());
241 testingTarget.Dispose();
242 tlog.Debug(tag, $"Uint16PairGreaterThan END (OK)");