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/VectorBase")]
13 public class InternalVectorBaseTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("VectorBase constructor.")]
32 [Property("SPEC", "Tizen.NUI.VectorBase.VectorBase C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void VectorBaseConstructor()
38 tlog.Debug(tag, $"VectorBaseConstructor START");
40 using (View view = new View())
42 var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
43 Assert.IsNotNull(testingTarget, "Should be not null!");
44 Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
46 testingTarget.Dispose();
49 tlog.Debug(tag, $"VectorBaseConstructor END (OK)");
54 [Description("VectorBase Capacity.")]
55 [Property("SPEC", "Tizen.NUI.VectorBase.Capacity M")]
56 [Property("SPEC_URL", "-")]
57 [Property("CRITERIA", "MR")]
58 [Property("AUTHOR", "guowei.wang@samsung.com")]
59 public void VectorBaseCapacity()
61 tlog.Debug(tag, $"VectorBaseCapacity START");
63 using (View view = new View())
65 var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
66 Assert.IsNotNull(testingTarget, "Should be not null!");
67 Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
71 var result = testingTarget.Capacity();
72 tlog.Debug(tag, "Capacity : " + result);
76 tlog.Debug(tag, e.Message.ToString());
77 Assert.Fail("Caught Exception: Failed!");
80 testingTarget.Dispose();
83 tlog.Debug(tag, $"VectorBaseCapacity END (OK)");
88 [Description("VectorBase Count.")]
89 [Property("SPEC", "Tizen.NUI.VectorBase.Count M")]
90 [Property("SPEC_URL", "-")]
91 [Property("CRITERIA", "MR")]
92 [Property("AUTHOR", "guowei.wang@samsung.com")]
93 public void VectorBaseCount()
95 tlog.Debug(tag, $"VectorBaseCount START");
97 using (View view = new View())
99 var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
100 Assert.IsNotNull(testingTarget, "Should be not null!");
101 Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
105 var result = testingTarget.Count();
106 tlog.Debug(tag, "Count : " + result);
110 tlog.Debug(tag, e.Message.ToString());
111 Assert.Fail("Caught Exception: Failed!");
114 testingTarget.Dispose();
117 tlog.Debug(tag, $"VectorBaseCount END (OK)");
122 [Description("VectorBase Size.")]
123 [Property("SPEC", "Tizen.NUI.VectorBase.Size M")]
124 [Property("SPEC_URL", "-")]
125 [Property("CRITERIA", "MR")]
126 [Property("AUTHOR", "guowei.wang@samsung.com")]
127 public void VectorBaseSize()
129 tlog.Debug(tag, $"VectorBaseSize START");
131 using (View view = new View())
133 var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
134 Assert.IsNotNull(testingTarget, "Should be not null!");
135 Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
139 var result = testingTarget.Size();
140 tlog.Debug(tag, "Size : " + result);
144 tlog.Debug(tag, e.Message.ToString());
145 Assert.Fail("Caught Exception: Failed!");
148 testingTarget.Dispose();
151 tlog.Debug(tag, $"VectorBaseSize END (OK)");
156 [Description("VectorBase Empty.")]
157 [Property("SPEC", "Tizen.NUI.VectorBase.Empty M")]
158 [Property("SPEC_URL", "-")]
159 [Property("CRITERIA", "MR")]
160 [Property("AUTHOR", "guowei.wang@samsung.com")]
161 public void VectorBaseEmpty()
163 tlog.Debug(tag, $"VectorBaseEmpty START");
165 using (View view = new View())
167 var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
168 Assert.IsNotNull(testingTarget, "Should be not null!");
169 Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
173 var result = testingTarget.Empty();
174 tlog.Debug(tag, "Empty : " + result);
178 tlog.Debug(tag, e.Message.ToString());
179 Assert.Fail("Caught Exception: Failed!");
182 testingTarget.Dispose();
185 tlog.Debug(tag, $"VectorBaseEmpty END (OK)");