[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / MarkupExtensions / TSNUIResourcePathExtension.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/NUIResourcePathExtension")]
11     public class PublicNUIResourcePathExtensionTest
12     {
13         private const string tag = "NUITEST";
14         private NUIResourcePathExtension resPath;
15
16         internal class IServiceProviderImpl : IServiceProvider
17         {
18             public object GetService(Type serviceType) { return null; }
19         }
20
21         [SetUp]
22         public void Init()
23         {
24             tlog.Info(tag, "Init() is called!");
25             resPath = new NUIResourcePathExtension();
26         }
27
28         [TearDown]
29         public void Destroy()
30         {
31             resPath = null;
32             tlog.Info(tag, "Destroy() is called!");
33         }
34
35         [Test]
36         [Category("P1")]
37         [Description("NUIResourcePathExtension FilePath")]
38         [Property("SPEC", "Tizen.NUI.NUIResourcePathExtension.FilePath A")]
39         [Property("SPEC_URL", "-")]
40         [Property("CRITERIA", "PRW")]
41         public void NUIResourcePathExtensionFilePath()
42         {
43             tlog.Debug(tag, $"NUIResourcePathExtensionFilePath START");
44
45             try
46             {
47                 string tmp = resPath.FilePath;
48                 resPath.FilePath = tmp;
49                 Assert.AreEqual(tmp, resPath.FilePath, "Should be equal");
50             }
51             catch (Exception e)
52             {
53                 tlog.Debug(tag, e.Message.ToString());
54                 Assert.Fail("Caught Exception : Failed!");
55             }
56
57             tlog.Debug(tag, $"NUIResourcePathExtensionFilePath END");
58         }
59
60         [Test]
61         [Category("P1")]
62         [Description("NUIResourcePathExtension ProvideValue")]
63         [Property("SPEC", "Tizen.NUI.NUIResourcePathExtension.ProvideValue A")]
64         [Property("SPEC_URL", "-")]
65         [Property("CRITERIA", "PRW")]
66         public void NUIResourcePathExtensionProvideValue()
67         {
68             tlog.Debug(tag, $"NUIResourcePathExtensionProvideValue START");
69
70             try
71             {
72                 resPath.ProvideValue(new IServiceProviderImpl());
73             }
74             catch (Exception e)
75             {
76                 tlog.Debug(tag, e.Message.ToString());
77                 Assert.Fail("Caught Exception : Failed!");
78             }
79
80             tlog.Debug(tag, $"NUIResourcePathExtensionProvideValue END");
81         }
82     }
83 }