1 using NUnit.Framework;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("public/xaml/StaticResourceExtension")]
12 internal class PublicStaticResourceExtensionTest
14 private const string tag = "NUITEST";
15 private static StaticResourceExtension s1;
19 tlog.Info(tag, "Init() is called!");
20 s1 = new StaticResourceExtension();
27 tlog.Info(tag, "Destroy() is called!");
32 [Description("StaticResourceExtension Key")]
33 [Property("SPEC", "Tizen.NUI.StaticResourceExtension.Key A")]
34 [Property("SPEC_URL", "-")]
35 [Property("CRITERIA", "PRW")]
36 public void StaticResourceExtensionKey()
38 tlog.Debug(tag, $"StaticResourceExtensionKey START");
46 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
47 Assert.Fail("Caught Exception" + e.ToString());
49 tlog.Debug(tag, $"StaticResourceExtensionKey END (OK)");
50 Assert.Pass("StaticResourceExtensionKey");
53 private class ServiceProviderImplementer : IServiceProvider
55 private static readonly object service = new object();
57 public object GetService(Type type)
65 [Description("StaticResourceExtension ProvideValue")]
66 [Property("SPEC", "Tizen.NUI.StaticResourceExtension.ProvideValue M")]
67 [Property("SPEC_URL", "-")]
68 [Property("CRITERIA", "MR")]
69 public void StaticResourceExtensionProvideValue()
71 tlog.Debug(tag, $"StaticResourceExtensionProvideValue START");
74 ServiceProviderImplementer ss = new ServiceProviderImplementer();
81 tlog.Debug(tag, e.Message.ToString());
82 tlog.Debug(tag, $"StaticResourceExtensionProvideValue END (OK)");
83 Assert.Pass("Caught Exception : passed!");
87 private class XmlLineInfoImplent : IXmlLineInfo
89 public int LineNumber => 16;
91 public int LinePosition => 8;
93 public bool HasLineInfo()
101 [Description("StaticResourceExtension GetApplicationLevelResource")]
102 [Property("SPEC", "Tizen.NUI.StaticResourceExtension.GetApplicationLevelResource M")]
103 [Property("SPEC_URL", "-")]
104 [Property("CRITERIA", "MR")]
105 public void StaticResourceExtensionGetApplicationLevelResource()
107 tlog.Debug(tag, $"StaticResourceExtensionGetApplicationLevelResource START");
110 XmlLineInfoImplent xx = new XmlLineInfoImplent();
111 s1.GetApplicationLevelResource("mykey", xx);
115 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
116 Assert.Fail("Caught Exception" + e.ToString());
118 tlog.Debug(tag, $"StaticResourceExtensionGetApplicationLevelResource END (OK)");
119 Assert.Pass("StaticResourceExtensionGetApplicationLevelResource");