[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / MarkupExtensions / TSResourcePathExtension.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("public/Xaml/MarkupExtensions/ResourcePathExtension")]
13     public class PublicResourcePathExtensionTest
14     {
15         private const string tag = "NUITEST";
16         private string filePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Test_Theme.xaml";
17
18         internal class IServiceProviderImpl : IServiceProvider
19         {
20             public object GetService(Type serviceType) { return null; }
21         }
22
23         [SetUp]
24         public void Init()
25         {
26             tlog.Info(tag, "Init() is called!");
27         }
28
29         [TearDown]
30         public void Destroy()
31         {
32             tlog.Info(tag, "Destroy() is called!");
33         }
34
35         [Test]
36         [Category("P1")]
37         [Description("ResourcePathExtension constructor.")]
38         [Property("SPEC", "Tizen.NUI.ResourcePathExtension.ResourcePathExtension C")]
39         [Property("SPEC_URL", "-")]
40         [Property("CRITERIA", "PRO")]
41         [Property("AUTHOR", "guowei.wang@samsung.com")]
42         public void ResourcePathExtensionConstructor()
43         {
44             tlog.Debug(tag, $"ResourcePathExtensionConstructor START");
45
46             var testingTarget = new Tizen.NUI.Xaml.ResourcePathExtension();
47             Assert.IsNotNull(testingTarget, "Can't create success object ResourcePathExtension.");
48             Assert.IsInstanceOf<Tizen.NUI.Xaml.ResourcePathExtension>(testingTarget, "Should return ResourcePathExtension instance.");
49
50             testingTarget.FilePath = filePath;
51             tlog.Error(tag, "FilePath : " + testingTarget.FilePath);
52
53             var result = testingTarget.ProvideValue(new IServiceProviderImpl());
54             tlog.Error(tag, "ProviderValue : " + result);
55
56             testingTarget = null;
57             tlog.Debug(tag, $"ResourcePathExtensionConstructor END (OK)");
58         }
59     }
60 }