f2238e3fa4df9111ece3f1229f7785e0ed71d4de
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Events / TSTapGesture.cs
1 using NUnit.Framework;
2 using NUnit.Framework.TUnit;
3 using System;
4 using Tizen.NUI;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("public/Events/TapGesture")]
13     class PublicTapGestureTest
14     {
15         private const string tag = "NUITEST";
16
17         [SetUp]
18         public void Init()
19         {
20             tlog.Info(tag, "Init() is called!");
21         }
22
23         [TearDown]
24         public void Destroy()
25         {
26             tlog.Info(tag, "Destroy() is called!");
27         }
28
29         [Test]
30         [Category("P1")]
31         [Description("TapGesture constructor")]
32         [Property("SPEC", "Tizen.NUI.TapGesture.TapGesture C")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "CONSTR")]
35         [Property("AUTHOR", "guowei.wang@samsung.com")]
36         public void TapGestureConstructor()
37         {
38             tlog.Debug(tag, $"TapGestureConstructor START");
39             
40             TapGesture a1 = new TapGesture();
41             
42             a1.Dispose();
43
44             
45             tlog.Debug(tag, $"TapGestureConstructor END (OK)");
46             Assert.Pass("TapGestureConstructor");
47         }
48
49         [Test]
50         [Category("P1")]
51         [Description("Test NumberOfTaps property.")]
52         [Property("SPEC", "Tizen.NUI.TapGesture.NumberOfTaps A")]
53         [Property("SPEC_URL", "-")]
54         [Property("CRITERIA", "PRW")]
55         [Property("AUTHOR", "guowei.wang@samsung.com")]
56         public void TapGestureNumberOfTaps()
57         {
58             tlog.Debug(tag, $"TapGestureNumberOfTaps START");
59             TapGesture a1 = new TapGesture();
60
61             uint b1 = a1.NumberOfTaps;
62             
63             tlog.Debug(tag, $"TapGestureNumberOfTaps END (OK)");
64             Assert.Pass("TapGestureNumberOfTaps");
65         }
66
67         [Test]
68         [Category("P1")]
69         [Description("Test NumberOfTouches property.")]
70         [Property("SPEC", "Tizen.NUI.TapGesture.NumberOfTouches A")]
71         [Property("SPEC_URL", "-")]
72         [Property("CRITERIA", "PRW")]
73         [Property("AUTHOR", "guowei.wang@samsung.com")]
74         public void TapGestureNumberOfTouches()
75         {
76             tlog.Debug(tag, $"TapGestureNumberOfTouches START");
77             TapGesture a1 = new TapGesture();
78
79             uint b1 = a1.NumberOfTouches;
80             
81             tlog.Debug(tag, $"TapGestureNumberOfTouches END (OK)");
82             Assert.Pass("TapGestureNumberOfTouches");
83         }
84
85         [Test]
86         [Category("P1")]
87         [Description("Test ScreenPoint property.")]
88         [Property("SPEC", "Tizen.NUI.TapGesture.ScreenPoint A")]
89         [Property("SPEC_URL", "-")]
90         [Property("CRITERIA", "PRW")]
91         [Property("AUTHOR", "guowei.wang@samsung.com")]
92         public void TapGestureScreenPoint()
93         {
94             tlog.Debug(tag, $"TapGestureScreenPoint START");
95             TapGesture a1 = new TapGesture();
96
97             Vector2 v1 = a1.ScreenPoint;
98             
99             tlog.Debug(tag, $"TapGestureScreenPoint END (OK)");
100             Assert.Pass("TapGestureScreenPoint");
101         }
102
103         [Test]
104         [Category("P1")]
105         [Description("Test LocalPoint property.")]
106         [Property("SPEC", "Tizen.NUI.TapGesture.LocalPoint A")]
107         [Property("SPEC_URL", "-")]
108         [Property("CRITERIA", "PRW")]
109         [Property("AUTHOR", "guowei.wang@samsung.com")]
110         public void TapGestureLocalPoint()
111         {
112             tlog.Debug(tag, $"TapGestureLocalPoint START");
113             TapGesture a1 = new TapGesture();
114
115             Vector2 v1 = a1.LocalPoint;
116             
117             tlog.Debug(tag, $"TapGestureLocalPoint END (OK)");
118             Assert.Pass("TapGestureLocalPoint");
119         }
120
121         [Test]
122         [Category("P1")]
123         [Description("Test GetTapGestureFromPtr property.")]
124         [Property("SPEC", "Tizen.NUI.TapGesture.GetTapGestureFromPtr A")]
125         [Property("SPEC_URL", "-")]
126         [Property("CRITERIA", "PRW")]
127         [Property("AUTHOR", "guowei.wang@samsung.com")]
128         public void TapGestureGetTapGestureFromPtr()
129         {
130             tlog.Debug(tag, $"TapGestureGetTapGestureFromPtr START");
131             TapGesture a1 = new TapGesture();
132                         
133             TapGesture a2 = TapGesture.GetTapGestureFromPtr(a1.SwigCPtr.Handle);
134
135             a1.Dispose();
136             
137             tlog.Debug(tag, $"TapGestureGetTapGestureFromPtr END (OK)");
138             Assert.Pass("TapGestureGetTapGestureFromPtr");
139         }
140     }
141
142 }