e137956bfbeb8c309edcbb814a83e632a0d9e09f
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / TSXamlCompilationAttribute.cs
1 using NUnit.Framework;
2 using System;
3 using Tizen.NUI.Xaml;
4
5 namespace Tizen.NUI.Devel.Tests
6 {
7     using tlog = Tizen.Log;
8
9     [TestFixture]
10     [Description("public/xaml/XamlCompilationAttribute")]
11     internal class PublicXamlCompilationAttributeTest
12     {
13         private const string tag = "NUITEST";
14         private static XamlCompilationAttribute x1;
15         [SetUp]
16         public void Init()
17         {
18             tlog.Info(tag, "Init() is called!");
19             XamlCompilationOptions xamlCompilationOptions = new XamlCompilationOptions();
20
21             x1 = new XamlCompilationAttribute(xamlCompilationOptions);
22         }
23
24         [TearDown]
25         public void Destroy()
26         {
27             x1 = null;
28             tlog.Info(tag, "Destroy() is called!");
29         }
30
31         [Test]
32         [Category("P1")]
33         [Description("XamlCompilationAttribute XamlCompilationAttribute")]
34         [Property("SPEC", "Tizen.NUI.XamlCompilationAttribute.XamlCompilationAttribute C")]
35         [Property("SPEC_URL", "-")]
36         [Property("CRITERIA", "CONSTR")]
37         public void XamlCompilationAttributeConstructor()
38         {
39             tlog.Debug(tag, $"XamlCompilationAttributeConstructor START");
40
41             XamlCompilationOptions xamlCompilationOptions = new XamlCompilationOptions();
42
43             XamlCompilationAttribute x2 = new XamlCompilationAttribute(xamlCompilationOptions);
44
45             x2 = null;
46             tlog.Debug(tag, $"XamlCompilationAttributeConstructor END (OK)");
47             Assert.Pass("XamlCompilationAttributeConstructor");
48         }
49
50         [Test]
51         [Category("P1")]
52         [Description("XamlCompilationAttribute XamlCompilationOptions ")]
53         [Property("SPEC", "Tizen.NUI.XamlCompilationAttribute.XamlCompilationOptions  A")]
54         [Property("SPEC_URL", "-")]
55         [Property("CRITERIA", "PRW")]
56         public void XamlCompilationAttributeXamlCompilationOptions()
57         {
58             tlog.Debug(tag, $"XamlCompilationAttributeXamlCompilationOptions START");
59             try
60             {
61                 XamlCompilationOptions option = x1.XamlCompilationOptions;
62                 x1.XamlCompilationOptions = option;
63             }
64             catch (Exception e)
65             {
66                 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
67                 Assert.Fail("Caught Exception" + e.ToString());
68             }
69             tlog.Debug(tag, $"XamlCompilationAttributeXamlCompilationOptions END (OK)");
70             Assert.Pass("XamlCompilationAttributeXamlCompilationOptions");
71         }
72
73         [Test]
74         [Category("P1")]
75         [Description("XamlCExtensions IsCompiled ")]
76         [Property("SPEC", "Tizen.NUI.XamlCExtensions.IsCompiled M")]
77         [Property("SPEC_URL", "-")]
78         [Property("CRITERIA", "MR")]
79         public void XamlCompilationAttributeIsCompiled()
80         {
81             tlog.Debug(tag, $"XamlCExtensionsIsCompiled START");
82             try
83             {
84                 Tizen.NUI.Xaml.XamlCExtensions.IsCompiled(typeof(string));
85             }
86             catch (Exception e)
87             {
88                 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
89                 Assert.Fail("Caught Exception" + e.ToString());
90             }
91             tlog.Debug(tag, $"XamlCExtensionsIsCompiled END (OK)");
92             Assert.Pass("XamlCExtensionsIsCompiled");
93         }
94     }
95 }