e4db727528942707afc2d47d8f1bb9aa85897fee
[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
46             
47             tlog.Debug(tag, $"RotationGestureConstructor END (OK)");
48             Assert.Pass("RotationGesture");
49         }
50
51         [Test]
52         [Category("P1")]
53         [Description("Test Rotation property.")]
54         [Property("SPEC", "Tizen.NUI.RotationGesture.Rotation A")]
55         [Property("SPEC_URL", "-")]
56         [Property("CRITERIA", "PRW")]
57         [Property("AUTHOR", "guowei.wang@samsung.com")]
58         public void RotationGestureRotation()
59         {
60             tlog.Debug(tag, $"RotationGestureRotation START");
61             Gesture.StateType state = Gesture.StateType.Finished;
62             RotationGesture a1 = new RotationGesture(state);
63
64             float f1 = a1.Rotation;
65             
66             tlog.Debug(tag, $"RotationGestureRotation END (OK)");
67             Assert.Pass("RotationGestureRotation");
68         }
69
70         [Test]
71         [Category("P1")]
72         [Description("Test ScreenCenterPoint property.")]
73         [Property("SPEC", "Tizen.NUI.RotationGesture.ScreenCenterPoint A")]
74         [Property("SPEC_URL", "-")]
75         [Property("CRITERIA", "PRW")]
76         [Property("AUTHOR", "guowei.wang@samsung.com")]
77         public void RotationGestureScreenCenterPoint()
78         {
79             tlog.Debug(tag, $"RotationGestureScreenCenterPoint START");
80             Gesture.StateType state = Gesture.StateType.Finished;
81             RotationGesture a1 = new RotationGesture(state);
82
83             Vector2 v1 = a1.ScreenCenterPoint;
84             
85             tlog.Debug(tag, $"RotationGestureScreenCenterPoint END (OK)");
86             Assert.Pass("RotationGestureScreenCenterPoint");
87         }
88
89         [Test]
90         [Category("P1")]
91         [Description("Test LocalCenterPoint property.")]
92         [Property("SPEC", "Tizen.NUI.RotationGesture.LocalCenterPoint A")]
93         [Property("SPEC_URL", "-")]
94         [Property("CRITERIA", "PRW")]
95         [Property("AUTHOR", "guowei.wang@samsung.com")]
96         public void RotationGestureLocalCenterPoint()
97         {
98             tlog.Debug(tag, $"RotationGestureLocalCenterPoint START");
99             Gesture.StateType state = Gesture.StateType.Finished;
100             RotationGesture a1 = new RotationGesture(state);
101
102             Vector2 v1 = a1.LocalCenterPoint;
103             
104             tlog.Debug(tag, $"RotationGestureLocalCenterPoint END (OK)");
105             Assert.Pass("RotationGestureLocalCenterPoint");
106         }
107
108         [Test]
109         [Category("P1")]
110         [Description("RotationGesture getCPtr")]
111         [Property("SPEC", "Tizen.NUI.RotationGesture.getCPtr M")]
112         [Property("SPEC_URL", "-")]
113         [Property("CRITERIA", "MR")]
114         [Property("AUTHOR", "guowei.wang@samsung.com")]
115         public void RotationGesturegetCPtr()
116         {
117             tlog.Debug(tag, $"RotationGesturegetCPtr START");
118             Gesture.StateType state = Gesture.StateType.Finished;
119             RotationGesture a1 = new RotationGesture(state);
120             global::System.Runtime.InteropServices.HandleRef r1 = RotationGesture.getCPtr(a1);
121             
122             tlog.Debug(tag, $"RotationGesturegetCPtr END (OK)");
123             Assert.Pass("RotationGesturegetCPtr");
124         }
125
126         [Test]
127         [Category("P1")]
128         [Description("RotationGesture GetRotationGestureFromPtr")]
129         [Property("SPEC", "Tizen.NUI.RotationGesture.GetRotationGestureFromPtr M")]
130         [Property("SPEC_URL", "-")]
131         [Property("CRITERIA", "MR")]
132         [Property("AUTHOR", "guowei.wang@samsung.com")]
133         public void RotationGestureGetRotationGestureFromPtr()
134         {
135             tlog.Debug(tag, $"RotationGestureGetRotationGestureFromPtr START");
136             Gesture.StateType state = Gesture.StateType.Finished;
137             RotationGesture a2 = new RotationGesture(state);                    
138             RotationGesture a1 = RotationGesture.GetRotationGestureFromPtr(RotationGesture.getCPtr(a2).Handle);
139             
140             a2.Dispose();            
141             tlog.Debug(tag, $"RotationGestureGetRotationGestureFromPtr END (OK)");
142             Assert.Pass("RotationGestureGetRotationGestureFromPtr");
143         }
144     }
145
146 }