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