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