3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("public/xaml/MarkupExtensions/ReferenceExtension")]
13 public class PublicReferenceExtensionTest
15 private const string tag = "NUITEST";
16 private Tizen.NUI.Xaml.ReferenceExtension reference;
18 internal class IServiceProviderImpl : IServiceProvider
20 public object GetService(Type serviceType) { return null; }
26 tlog.Info(tag, "Init() is called!");
27 reference = new Tizen.NUI.Xaml.ReferenceExtension();
34 tlog.Info(tag, "Destroy() is called!");
39 [Description("ReferenceExtension Name")]
40 [Property("SPEC", "Tizen.NUI.ReferenceExtension.Name A")]
41 [Property("SPEC_URL", "-")]
42 [Property("CRITERIA", "PRW")]
43 public void ReferenceExtensionName()
45 tlog.Debug(tag, $"ReferenceExtensionName START");
49 var name = reference.Name;
50 reference.Name = name;
51 Assert.AreEqual(name, reference.Name, "Should be equal");
55 tlog.Debug(tag, e.Message.ToString());
56 Assert.Fail("Caught Exception : Failed!");
59 tlog.Debug(tag, $"ReferenceExtensionName END");
64 [Description("ReferenceExtension ProvideValue")]
65 [Property("SPEC", "Tizen.NUI.ReferenceExtension.ProvideValue M")]
66 [Property("SPEC_URL", "-")]
67 [Property("CRITERIA", "MR")]
68 public void ReferenceExtensionProvideValue()
70 tlog.Debug(tag, $"ReferenceExtensionProvideValue START");
74 reference.ProvideValue(new IServiceProviderImpl()); // serviceProvider is null
76 catch (ArgumentException e)
78 tlog.Debug(tag, e.Message.ToString());
79 tlog.Debug(tag, $"ReferenceExtensionProvideValue END");
80 Assert.Pass("Caught ArgumentException : Passed!");