[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Common / TSPropertyRegistration.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/PropertyRegistration")]
13     public class InternalPropertyRegistrationTest
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("PropertyRegistration constructor.")]
32         [Property("SPEC", "Tizen.NUI.PropertyRegistration.PropertyRegistration C")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "CONSTR")]
35         [Property("COVPARAM", "")]
36         [Property("AUTHOR", "guowei.wang@samsung.com")]
37         public void PropertyRegistrationConstructor()
38         {
39             tlog.Debug(tag, $"PropertyRegistrationConstructor START");
40
41             using (View view = new View())
42             {
43
44                 TypeRegistration registration = new TypeRegistration(view.SwigCPtr.Handle, false);
45                 SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void set = new SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void(View.getCPtr(view).Handle);
46                 SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value get = new SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value(View.getCPtr(view).Handle);
47
48                 var testingTarget = new PropertyRegistration(registration, "mytest", 10000001, PropertyType.Float, set, get);
49                 Assert.IsNotNull(testingTarget, "null handle");
50                 Assert.IsInstanceOf<PropertyRegistration>(testingTarget, "Should return PropertyRegistration instance.");
51
52                 testingTarget.Dispose();
53             }
54
55             tlog.Debug(tag, $"PropertyRegistrationConstructor END (OK)");
56         }
57     }
58 }