1 using NUnit.Framework;
5 namespace Tizen.NUI.Devel.Tests
7 using tlog = Tizen.Log;
10 [Description("public/xaml/MarkupExtensions/DynamicResourceExtension")]
11 public class PublicDynamicResourceExtensionTest
13 private const string tag = "NUITEST";
14 private DynamicResourceExtension resExtension;
16 internal class IServiceProviderImpl : IServiceProvider
18 public object GetService(Type serviceType) { return null; }
24 tlog.Info(tag, "Init() is called!");
25 resExtension = new DynamicResourceExtension();
32 tlog.Info(tag, "Destroy() is called!");
37 [Description("DynamicResourceExtension Key")]
38 [Property("SPEC", "Tizen.NUI.DynamicResourceExtension.Key A")]
39 [Property("SPEC_URL", "-")]
40 [Property("CRITERIA", "PRW")]
41 public void DynamicResourceExtensionKey()
43 tlog.Debug(tag, $"DynamicResourceExtensionKey START");
47 string key = resExtension.Key;
48 resExtension.Key = key;
49 Assert.AreEqual(key, resExtension.Key, "Should be equal");
53 tlog.Debug(tag, e.Message.ToString());
54 Assert.Fail("Caught Exception : Failed!");
57 tlog.Debug(tag, $"DynamicResourceExtensionKey END");
62 [Description("DynamicResourceExtension Key")]
63 [Property("SPEC", "Tizen.NUI.DynamicResourceExtension.Key A")]
64 [Property("SPEC_URL", "-")]
65 [Property("CRITERIA", "PRW")]
66 public void DynamicResourceExtensionProvideValue()
68 tlog.Debug(tag, $"DynamicResourceExtensionProvideValue START");
72 resExtension.Key = "Key";
73 resExtension.ProvideValue(new IServiceProviderImpl());
77 tlog.Debug(tag, e.Message.ToString());
78 Assert.Fail("Caught Exception : Failed!");
81 tlog.Debug(tag, $"DynamicResourceExtensionProvideValue END");