48e42d9e7d47db783b21ba1c551d518db568a893
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Events / TSLongPressGesture.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/LongPressGesture")]
13     internal class PublicLongPressGestureTest
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("Create a LongPressGesture object. Check whether LongPressGesture is successfully created or not.")]
32         [Property("SPEC", "Tizen.NUI.LongPressGesture.LongPressGesture C")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "CONSTR")]
35         [Property("COVPARAM", "")]
36         [Property("AUTHOR", "guowei.wang@samsung.com")]
37         public void LongPressGestureConstructor()
38         {
39             tlog.Debug(tag, $"LongPressGestureConstructor START");
40             Gesture.StateType state = Gesture.StateType.Finished;
41             LongPressGesture ret1 = new LongPressGesture(state);                      
42
43             ret1.Dispose();
44             
45             tlog.Debug(tag, $"LongPressGestureConstructor END (OK)");
46             Assert.Pass("LongPressGestureConstructor");
47         }
48
49         [Test]
50         [Category("P1")]
51         [Description("Test NumberOfTouches property.")]
52         [Property("SPEC", "Tizen.NUI.LongPressGesture.NumberOfTouches A")]
53         [Property("SPEC_URL", "-")]
54         [Property("CRITERIA", "PRW")]
55         [Property("AUTHOR", "guowei.wang@samsung.com")]
56         public void LongPressGestureNumberOfTouches()
57         {
58             tlog.Debug(tag, $"LongPressGestureNumberOfTouches START");
59             Gesture.StateType state = Gesture.StateType.Finished;
60             LongPressGesture ret1 = new LongPressGesture(state);
61
62             uint num = ret1.NumberOfTouches;
63             
64             tlog.Debug(tag, $"LongPressGestureNumberOfTouches END (OK)");
65             Assert.Pass("LongPressGestureNumberOfTouches");
66         }
67
68         [Test]
69         [Category("P1")]
70         [Description("Test ScreenPoint property.")]
71         [Property("SPEC", "Tizen.NUI.LongPressGesture.ScreenPoint A")]
72         [Property("SPEC_URL", "-")]
73         [Property("CRITERIA", "PRW")]
74         [Property("AUTHOR", "guowei.wang@samsung.com")]
75         public void LongPressGestureScreenPoint()
76         {
77             tlog.Debug(tag, $"LongPressGestureScreenPoint START");
78             Gesture.StateType state = Gesture.StateType.Finished;
79             LongPressGesture ret1 = new LongPressGesture(state);
80
81             Vector2 v = ret1.ScreenPoint;
82             ret1.Dispose();
83             
84             tlog.Debug(tag, $"LongPressGestureScreenPoint END (OK)");
85             Assert.Pass("LongPressGestureScreenPoint");
86         }
87
88         [Test]
89         [Category("P1")]
90         [Description("Test LocalPoint property.")]
91         [Property("SPEC", "Tizen.NUI.LongPressGesture.LocalPoint A")]
92         [Property("SPEC_URL", "-")]
93         [Property("CRITERIA", "PRW")]
94         [Property("AUTHOR", "guowei.wang@samsung.com")]
95         public void LongPressGestureLocalPoint()
96         {
97             tlog.Debug(tag, $"LongPressGestureLocalPoint START");
98             Gesture.StateType state = Gesture.StateType.Finished;
99             LongPressGesture ret1 = new LongPressGesture(state);
100
101             Vector2 v = ret1.LocalPoint;
102
103             ret1.Dispose();
104             
105             tlog.Debug(tag, $"LongPressGestureLocalPoint END (OK)");
106             Assert.Pass("LongPressGestureLocalPoint");
107         }
108
109         [Test]
110         [Category("P1")]
111         [Description("Test getCPtr property.")]
112         [Property("SPEC", "Tizen.NUI.LongPressGesture.getCPtr M")]
113         [Property("SPEC_URL", "-")]
114         [Property("CRITERIA", "MR")]
115         [Property("AUTHOR", "guowei.wang@samsung.com")]
116         public void LongPressGesturegetCPtr()
117         {
118             tlog.Debug(tag, $"LongPressGesturegetCPtr START");
119             Gesture.StateType state = Gesture.StateType.Finished;
120             LongPressGesture ret1 = new LongPressGesture(state);
121
122             global::System.Runtime.InteropServices.HandleRef a = LongPressGesture.getCPtr(ret1);
123             
124             tlog.Debug(tag, $"LongPressGesturegetCPtr END (OK)");
125             Assert.Pass("LongPressGestureLocalPoint");
126         }
127
128         [Test]
129         [Category("P1")]
130         [Description("Test GetLongPressGestureFromPtr property.")]
131         [Property("SPEC", "Tizen.NUI.LongPressGesture.GetLongPressGestureFromPtr M")]
132         [Property("SPEC_URL", "-")]
133         [Property("CRITERIA", "MR")]
134         [Property("AUTHOR", "guowei.wang@samsung.com")]
135         public void LongPressGestureGetLongPressGestureFromPtr()
136         {
137             tlog.Debug(tag, $"LongPressGestureGetLongPressGestureFromPtr START");
138             Gesture.StateType state = Gesture.StateType.Finished;
139             LongPressGesture ret1 = new LongPressGesture(state);                
140                         
141             LongPressGesture ret = LongPressGesture.GetLongPressGestureFromPtr(LongPressGesture.getCPtr(ret1).Handle);
142                         
143             ret1.Dispose();
144             ret.Dispose();
145
146             
147             tlog.Debug(tag, $"LongPressGestureGetLongPressGestureFromPtr END (OK)");
148             Assert.Pass("LongPressGestureGetLongPressGestureFromPtr");
149         }
150     }
151
152 }