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