cd26e42c1f9963d67523469adf99bbd57b6af94d
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / MarkupExtensions / TSApplicationResourcePathExtension.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/ApplicationResourcePathExtension ")]
11     public class PublicApplicationResourcePathExtensionTest
12     {
13         private const string tag = "NUITEST";
14         private ApplicationResourcePathExtension path;
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             path = new ApplicationResourcePathExtension();
26         }
27
28         [TearDown]
29         public void Destroy()
30         {
31             path = null;
32             tlog.Info(tag, "Destroy() is called!");
33         }
34
35         [Test]
36         [Category("P1")]
37         [Description("ApplicationResourcePathExtension FilePath ")]
38         [Property("SPEC", "Tizen.NUI.ApplicationResourcePathExtension.FilePath A")]
39         [Property("SPEC_URL", "-")]
40         [Property("CRITERIA", "PRW")]
41         public void ApplicationResourcePathExtensionFilePath()
42         {
43             tlog.Debug(tag, $"ApplicationResourcePathExtensionFilePath START");
44
45             try
46             {
47                 string file = path.FilePath;
48                 path.FilePath = file;
49                 Assert.AreEqual(file, path.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, $"ApplicationResourcePathExtensionFilePath END");
58         }
59
60         [Test]
61         [Category("P1")]
62         [Description("ApplicationResourcePathExtension ProvideValue ")]
63         [Property("SPEC", "Tizen.NUI.ApplicationResourcePathExtension.ProvideValue M")]
64         [Property("SPEC_URL", "-")]
65         [Property("CRITERIA", "MR")]
66         public void ApplicationResourcePathExtensionProvideValue()
67         {
68             tlog.Debug(tag, $"ApplicationResourcePathExtensionProvideValue START");
69
70             try
71             {
72                 path.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, $"ApplicationResourcePathExtensionProvideValue END");
81         }
82
83
84     }
85 }