[NUI] Add TCs for NUI.Components.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Components.Devel.Tests / testcase / Controls / TSDatePicker.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI;
5 using Tizen.NUI.Components;
6 using Tizen.NUI.BaseComponents;
7
8 namespace Tizen.NUI.Components.Devel.Tests
9 {
10     using tlog = Tizen.Log;
11
12     [TestFixture]
13     [Description("Controls/DatePicker")]
14     public class DatePickerTest
15     {
16         private const string tag = "NUITEST";
17
18         internal class MyDatePicker : DatePicker
19         {
20             public MyDatePicker() : base()
21             { }
22
23             public void OnDispose(DisposeTypes types)
24             {
25                 base.Dispose(types);
26             }
27
28             public override void OnInitialize()
29             {
30                 base.OnInitialize();
31             }
32
33             public override void ApplyStyle(ViewStyle viewStyle)
34             {
35                 base.ApplyStyle(viewStyle);
36             }
37         }
38
39         internal class MyDatePickerStyle : DatePickerStyle
40         {
41         }
42
43         [SetUp]
44         public void Init()
45         {
46             tlog.Info(tag, "Init() is called!");
47         }
48
49         [TearDown]
50         public void Destroy()
51         {
52             tlog.Info(tag, "Destroy() is called!");
53         }
54
55         //[Test]
56         //[Category("P1")]
57         //[Description("DatePicker constructor.")]
58         //[Property("SPEC", "Tizen.NUI.Components.DatePicker.constructor C")]
59         //[Property("SPEC_URL", "-")]
60         //[Property("CRITERIA", "CONSTR")]
61         //[Property("COVPARAM", "")]
62         //[Property("AUTHOR", "guowei.wang@samsung.com")]
63         //public void DatePickerConstructor()
64         //{
65         //    tlog.Debug(tag, $"DatePickerConstructor START");
66
67         //    var testingTarget = new MyDatePicker();
68         //    Assert.IsNotNull(testingTarget, "null handle");
69         //    Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
70
71         //    try
72         //    {
73         //        testingTarget.OnDispose(DisposeTypes.Explicit);
74         //    }
75         //    catch (Exception e)
76         //    {
77         //        tlog.Debug(tag, e.Message.ToString());
78         //        Assert.Fail("Caught Exception : Failed!");
79         //    }
80
81         //    testingTarget.Dispose();
82         //    tlog.Debug(tag, $"DatePickerConstructor END (OK)");
83         //}
84
85         //[Test]
86         //[Category("P1")]
87         //[Description("DatePicker OnInitialize.")]
88         //[Property("SPEC", "Tizen.NUI.Components.DatePicker.OnInitialize M")]
89         //[Property("SPEC_URL", "-")]
90         //[Property("CRITERIA", "MR")]
91         //[Property("COVPARAM", "")]
92         //[Property("AUTHOR", "guowei.wang@samsung.com")]
93         //public void DatePickerOnInitialize()
94         //{
95         //    tlog.Debug(tag, $"DatePickerOnInitialize START");
96
97         //    var testingTarget = new MyDatePicker();
98         //    Assert.IsNotNull(testingTarget, "null handle");
99         //    Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
100
101         //    try
102         //    {
103         //        testingTarget.OnInitialize();
104         //    }
105         //    catch (Exception e)
106         //    {
107         //        tlog.Debug(tag, e.Message.ToString());
108         //        Assert.Fail("Caught Exception : Failed!");
109         //    }
110
111         //    testingTarget.Dispose();
112         //    tlog.Debug(tag, $"DatePickerOnInitialize END (OK)");
113         //}
114
115         //[Test]
116         //[Category("P1")]
117         //[Description("DatePicker ApplyStyle.")]
118         //[Property("SPEC", "Tizen.NUI.Components.DatePicker.ApplyStyle M")]
119         //[Property("SPEC_URL", "-")]
120         //[Property("CRITERIA", "MR")]
121         //[Property("COVPARAM", "")]
122         //[Property("AUTHOR", "guowei.wang@samsung.com")]
123         //public void DatePickerApplyStyle()
124         //{
125         //    tlog.Debug(tag, $"DatePickerApplyStyle START");
126
127         //    var testingTarget = new MyDatePicker();
128         //    Assert.IsNotNull(testingTarget, "null handle");
129         //    Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
130
131         //    try
132         //    {
133         //        ViewStyle style = new ViewStyle()
134         //        {
135         //            Size = new Size(30, 200)
136         //        };
137         //        testingTarget.ApplyStyle(style);
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         //    tlog.Debug(tag, $"DatePickerApplyStyle END (OK)");
147         //}
148     }
149 }