43b60236687e11a639ec6018afb2839d61e295d2
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / TSProvideCompiledAttribute.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/ProvideCompiledAttribute")]
11     internal class PublicProvideCompiledAttributeTest
12     {
13         private const string tag = "NUITEST";
14         private static ProvideCompiledAttribute p1;
15
16         [SetUp]
17         public void Init()
18         {
19             p1 = new ProvideCompiledAttribute("mytestAttribute");
20             tlog.Info(tag, "Init() is called!");
21         }
22
23         [TearDown]
24         public void Destroy()
25         {
26             p1 = null;
27             tlog.Info(tag, "Destroy() is called!");
28         }
29
30         [Test]
31         [Category("P1")]
32         [Description("ProvideCompiledAttribute ProvideCompiledAttribute")]
33         [Property("SPEC", "Tizen.NUI.ProvideCompiledAttribute.ProvideCompiledAttribute C")]
34         [Property("SPEC_URL", "-")]
35         [Property("CRITERIA", "CONSTR")]
36         public void ProvideCompiledAttributeConstructor()
37         {
38             tlog.Debug(tag, $"ProvideCompiledAttributeConstructor START");
39             ProvideCompiledAttribute p2 = new ProvideCompiledAttribute("testAttribute");
40
41             p2 = null;
42             tlog.Debug(tag, $"ProvideCompiledAttributeConstructor END (OK)");
43             Assert.Pass("ProvideCompiledAttributeConstructor");
44         }
45
46         [Test]
47         [Category("P1")]
48         [Description("ProvideCompiledAttribute CompiledVersion")]
49         [Property("SPEC", "Tizen.NUI.ProvideCompiledAttribute.CompiledVersion A")]
50         [Property("SPEC_URL", "-")]
51         [Property("CRITERIA", "PRW")]
52         public void ProvideCompiledAttributeCompiledVersion()
53         {
54             tlog.Debug(tag, $"ProvideCompiledAttributeCompiledVersion START");
55             try
56             {
57                 string attribute = p1.CompiledVersion;
58             }
59             catch (Exception e)
60             {
61                 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
62                 Assert.Fail("Caught Exception" + e.ToString());
63             }
64             tlog.Debug(tag, $"ProvideCompiledAttributeCompiledVersion END (OK)");
65             Assert.Pass("ProvideCompiledAttributeCompiledVersion");
66         }
67     }
68 }