b263b54f597fdfe70a35b5378fd883431692d860
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Common / TSAuthenticationSignalType.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("internal/Common/AuthenticationSignalType")]
13     public class InternalAuthenticationSignalTypeTest
14     {
15         private const string tag = "NUITEST";
16                 
17                 private delegate bool dummyCallback(IntPtr signal);
18         private bool OnDummyCallback(IntPtr data)
19         {
20             return false;
21         }
22                 
23         [SetUp]
24         public void Init()
25         {
26             tlog.Info(tag, "Init() is called!");
27         }
28
29         [TearDown]
30         public void Destroy()
31         {
32             tlog.Info(tag, "Destroy() is called!");
33         }
34
35         [Test]
36         [Category("P1")]
37         [Description("AuthenticationSignalType constructor.")]
38         [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.AuthenticationSignalType C")]
39         [Property("SPEC_URL", "-")]
40         [Property("CRITERIA", "CONSTR")]
41         [Property("AUTHOR", "guowei.wang@samsung.com")]
42         public void AuthenticationSignalTypeConstructor()
43         {
44             tlog.Debug(tag, $"AuthenticationSignalTypeConstructor START");
45
46             using (View view = new View())
47             {
48                 var testingTarget = new AuthenticationSignalType(view.SwigCPtr.Handle, false);
49                 Assert.IsNotNull(testingTarget, "Should be not null!");
50                 Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
51
52                 testingTarget.Dispose();
53             }
54
55             tlog.Debug(tag, $"AuthenticationSignalTypeConstructor END (OK)");
56         }
57
58   //      [Test]
59   //      [Category("P1")]
60   //      [Description("AuthenticationSignalType Empty.")]
61   //      [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.Empty M")]
62   //      [Property("SPEC_URL", "-")]
63   //      [Property("CRITERIA", "MR")]
64   //      [Property("AUTHOR", "guowei.wang@samsung.com")]
65   //      public void AuthenticationSignalTypeEmpty()
66   //      {
67   //          tlog.Debug(tag, $"AuthenticationSignalTypeEmpty START");
68
69   //          var testingTarget = new AuthenticationSignalType();
70   //          Assert.IsNotNull(testingTarget, "Should be not null!");
71   //          Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
72
73   //          try
74   //          {
75   //              testingTarget.Empty();
76   //          }
77   //          catch (Exception e)
78   //          {
79   //              tlog.Debug(tag, e.Message.ToString());
80   //              Assert.Fail("Caught Exception: Failed!");
81   //          }
82
83   //          testingTarget.Dispose();
84
85   //          tlog.Debug(tag, $"AuthenticationSignalTypeEmpty END (OK)");
86   //      }
87
88   //      [Test]
89   //      [Category("P1")]
90   //      [Description("AuthenticationSignalType GetConnectionCount.")]
91   //      [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.GetConnectionCount M")]
92   //      [Property("SPEC_URL", "-")]
93   //      [Property("CRITERIA", "MR")]
94   //      [Property("AUTHOR", "guowei.wang@samsung.com")]
95   //      public void AuthenticationSignalTypeGetConnectionCount()
96   //      {
97   //          tlog.Debug(tag, $"AuthenticationSignalTypeGetConnectionCount START");
98
99   //          var testingTarget = new AuthenticationSignalType();
100   //          Assert.IsNotNull(testingTarget, "Should be not null!");
101   //          Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
102
103   //          try
104   //          {
105   //              testingTarget.GetConnectionCount();
106   //          }
107   //          catch (Exception e)
108   //          {
109   //              tlog.Debug(tag, e.Message.ToString());
110   //              Assert.Fail("Caught Exception: Failed!");
111   //          }
112
113   //          testingTarget.Dispose();
114
115   //          tlog.Debug(tag, $"AuthenticationSignalTypeGetConnectionCount END (OK)");
116   //      }
117
118   //      [Test]
119   //      [Category("P1")]
120   //      [Description("AuthenticationSignalType Connect.")]
121   //      [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.Connect M")]
122   //      [Property("SPEC_URL", "-")]
123   //      [Property("CRITERIA", "MR")]
124   //      [Property("AUTHOR", "guowei.wang@samsung.com")]
125   //      public void AuthenticationSignalTypeConnect()
126   //      {
127   //          tlog.Debug(tag, $"AuthenticationSignalTypeConnect START");
128
129   //          var testingTarget = new AuthenticationSignalType();
130   //          Assert.IsNotNull(testingTarget, "Should be not null!");
131   //          Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
132
133   //          try
134   //          {
135   //              dummyCallback callback = OnDummyCallback;
136   //              testingTarget.Connect(callback);
137   //              testingTarget.Disconnect(callback);
138   //          }
139   //          catch (Exception e)
140   //          {
141   //              tlog.Debug(tag, e.Message.ToString());
142   //              Assert.Fail("Caught Exception: Failed!");
143   //          }
144
145   //          testingTarget.Dispose();
146
147   //          tlog.Debug(tag, $"AuthenticationSignalTypeConnect END (OK)");
148   //      }
149
150   //      [Test]
151   //      [Category("P1")]
152   //      [Description("AuthenticationSignalType Emit.")]
153   //      [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.Emit M")]
154   //      [Property("SPEC_URL", "-")]
155   //      [Property("CRITERIA", "MR")]
156   //      [Property("AUTHOR", "guowei.wang@samsung.com")]
157   //      [Obsolete]
158   //      public void AuthenticationSignalTypeEmit()
159   //      {
160   //          tlog.Debug(tag, $"AuthenticationSignalTypeEmit START");
161   //          var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
162   //          var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
163
164   //          tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
165
166   //          var testingTarget = new AuthenticationSignalType();
167   //          Assert.IsNotNull(testingTarget, "Should be not null!");
168   //          Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
169
170   //          try
171   //          {
172   //              using (AutofillContainer container = new AutofillContainer("container"))
173   //              {
174   //                  testingTarget.Emit(container);
175   //              }
176   //          }
177   //          catch (Exception e)
178   //          {
179   //              tlog.Debug(tag, e.Message.ToString());
180   //              Assert.Fail("Caught Exception: Failed!");
181   //          }
182
183   //          testingTarget.Dispose();
184
185   //          tlog.Debug(tag, $"AuthenticationSignalTypeEmit END (OK)");
186   //      }
187     }
188 }