[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Common / TSViewWrapperImpl.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/ViewWrapperImpl")]
13     public class InternalViewWrapperImplTest
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("ViewWrapperImpl constructor.")]
32         [Property("SPEC", "Tizen.NUI.ViewWrapperImpl.ViewWrapperImpl M")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "MR")]
35         [Property("COVPARAM", "")]
36         [Property("AUTHOR", "guowei.wang@samsung.com")]
37         public void ViewWrapperImplConstructor()
38         {
39             tlog.Debug(tag, $"ViewWrapperImplConstructor START");
40
41             var testingTarget = new ViewWrapperImpl(CustomViewBehaviour.ViewBehaviourDefault);
42             Assert.IsNotNull(testingTarget, "should be not null");
43             Assert.IsInstanceOf<ViewWrapperImpl>(testingTarget, "should be an instance of testing target class!");
44
45             testingTarget.Dispose();
46             // disposed
47             testingTarget.Dispose();
48             tlog.Debug(tag, $"ViewWrapperImplConstructor END (OK)");
49         }
50
51         //[Test]
52         //[Category("P1")]
53         //[Description("ViewWrapperImpl New.")]
54         //[Property("SPEC", "Tizen.NUI.ViewWrapperImpl.New M")]
55         //[Property("SPEC_URL", "-")]
56         //[Property("CRITERIA", "MR")]
57         //[Property("COVPARAM", "")]
58         //[Property("AUTHOR", "guowei.wang@samsung.com")]
59         //public void ViewWrapperImplNew()
60         //{
61         //    tlog.Debug(tag, $"ViewWrapperImplNew START");
62
63         //    using (ViewWrapperImpl impl = new ViewWrapperImpl(CustomViewBehaviour.ViewBehaviourDefault))
64         //    {
65         //        var testingTarget = ViewWrapperImpl.New("CustomView", impl);
66         //        Assert.IsNotNull(testingTarget, "should be not null");
67         //        Assert.IsInstanceOf<ViewWrapper>(testingTarget, "should be an instance of testing target class!");
68
69         //        testingTarget.Dispose();
70         //    }
71
72         //    tlog.Debug(tag, $"ViewWrapperImplNew END (OK)");
73         //}
74
75         //[Test]
76         //[Category("P1")]
77         //[Description("ViewWrapperImpl ApplyThemeStyle.")]
78         //[Property("SPEC", "Tizen.NUI.ViewWrapperImpl.ApplyThemeStyle M")]
79         //[Property("SPEC_URL", "-")]
80         //[Property("CRITERIA", "MR")]
81         //[Property("COVPARAM", "")]
82         //[Property("AUTHOR", "guowei.wang@samsung.com")]
83         //public void ViewWrapperImplApplyThemeStyle()
84         //{
85         //    tlog.Debug(tag, $"ViewWrapperImplApplyThemeStyle START");
86
87         //    var testingTarget = new ViewWrapperImpl(CustomViewBehaviour.ViewBehaviourDefault);
88         //    Assert.IsNotNull(testingTarget, "should be not null");
89         //    Assert.IsInstanceOf<ViewWrapperImpl>(testingTarget, "should be an instance of testing target class!");
90
91         //    try
92         //    {
93         //        testingTarget.ApplyThemeStyle();
94         //    }
95         //    catch (Exception e)
96         //    {
97         //        tlog.Debug(tag, e.Message.ToString());
98         //        Assert.Fail("Caught Exception : Failed!");
99         //    }
100
101         //    testingTarget.Dispose();
102         //    tlog.Debug(tag, $"ViewWrapperImplApplyThemeStyle END (OK)");
103         //}
104
105         [Test]
106         [Category("P1")]
107         [Description("ViewWrapperImpl ViewBehaviourFlagCount.")]
108         [Property("SPEC", "Tizen.NUI.ViewWrapperImpl.ViewBehaviourFlagCount A")]
109         [Property("SPEC_URL", "-")]
110         [Property("CRITERIA", "PRO")]
111         [Property("COVPARAM", "")]
112         [Property("AUTHOR", "guowei.wang@samsung.com")]
113         public void ViewWrapperImplViewBehaviourFlagCount()
114         {
115             tlog.Debug(tag, $"ViewWrapperImplViewBehaviourFlagCount START");
116
117             var result = ViewWrapperImpl.ViewBehaviourFlagCount;
118             tlog.Debug(tag, "ViewBehaviourFlagCount : " + result);
119
120             tlog.Debug(tag, $"ViewWrapperImplViewBehaviourFlagCount END (OK)");
121         }
122     }
123 }