c9ccd78b1000c5ba4224fce9252867080fb6213f
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / MarkupExtensions / TSTypeExtension.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/MarkupExtensions/TypeExtension")]
11     public class PublicTypeExtensionTest
12     {
13         private const string tag = "NUITEST";
14         private TypeExtension tExtension;
15         [SetUp]
16         public void Init()
17         {
18             tlog.Info(tag, "Init() is called!");
19             tExtension = new TypeExtension();
20         }
21
22         [TearDown]
23         public void Destroy()
24         {
25             tExtension = null;
26             tlog.Info(tag, "Destroy() is called!");
27         }
28
29         [Test]
30         [Category("P1")]
31         [Description("TypeExtension TypeName")]
32         [Property("SPEC", "Tizen.NUI.TypeExtension.TypeName A")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "PRW")]
35         public void TypeExtensionTypeName()
36         {
37             tlog.Debug(tag, $"TypeExtensionTypeName START");
38
39             try
40             {
41                 var name = tExtension.TypeName;
42                 tExtension.TypeName = name;
43                 Assert.AreEqual(name, tExtension.TypeName, "Should be equal");
44             }
45             catch (Exception e)
46             {
47                 tlog.Debug(tag, e.Message.ToString());
48                 Assert.Fail("Caught Exception : Failed!");
49             }
50
51             tlog.Debug(tag, $"TypeExtensionTypeName END");
52         }
53     }
54 }