1 using NUnit.Framework;
3 using System.Collections;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("public/xaml/MarkupExtensions/ArrayExtension")]
12 public class PublicArrayExtensionTest
14 private const string tag = "NUITEST";
15 private ArrayExtension array;
17 internal class IServiceProviderImpl : IServiceProvider
19 public object GetService(Type serviceType) { return null; }
25 tlog.Info(tag, "Init() is called!");
26 array = new ArrayExtension();
33 tlog.Info(tag, "Destroy() is called!");
38 [Description("ArrayExtension Items")]
39 [Property("SPEC", "Tizen.NUI.ArrayExtension.Items A")]
40 [Property("SPEC_URL", "-")]
41 [Property("CRITERIA", "PRW")]
42 public void ArrayExtensionItems()
44 tlog.Debug(tag, $"ArrayExtensionItems START");
48 var item = array.Items;
49 tlog.Debug(tag, "Items : " + item);
53 tlog.Debug(tag, e.Message.ToString());
54 Assert.Fail("Caught Exception : Failed!");
57 tlog.Debug(tag, $"ArrayExtensionItems END");
62 [Description("ArrayExtension Type")]
63 [Property("SPEC", "Tizen.NUI.ArrayExtension.Type A")]
64 [Property("SPEC_URL", "-")]
65 [Property("CRITERIA", "PRW")]
66 public void ArrayExtensionType()
68 tlog.Debug(tag, $"ArrayExtensionType START");
72 var type = array.Type;
74 Assert.AreEqual(type, array.Type, "Should be equal");
78 tlog.Debug(tag, e.Message.ToString());
79 Assert.Fail("Caught Exception : Failed!");
82 tlog.Debug(tag, $"ArrayExtensionType END");
87 [Description("ArrayExtension ProvideValue")]
88 [Property("SPEC", "Tizen.NUI.ArrayExtension.ProvideValue A")]
89 [Property("SPEC_URL", "-")]
90 [Property("CRITERIA", "PRW")]
91 public void ArrayExtensionProvideValue()
93 tlog.Debug(tag, $"ArrayExtensionProvideValue START");
97 array.Type = typeof(string);
98 array.ProvideValue(new IServiceProviderImpl());
102 tlog.Debug(tag, e.Message.ToString());
103 Assert.Fail("Caught Exception : Failed!");
106 tlog.Debug(tag, $"ArrayExtensionProvideValue END");