1 using NUnit.Framework;
2 using NUnit.Framework.TUnit;
5 using Tizen.NUI.BaseComponents;
6 using Tizen.NUI.Events;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("public/CustomView/CustomViewRegistry")]
14 public class PublicCustomViewRegistryTest
16 private const string tag = "NUITEST";
17 public static Func<CustomView> CreateInstance { get; private set; }
22 tlog.Info(tag, "Init() is called!");
28 tlog.Info(tag, "Destroy() is called!");
33 [Description("ScriptableProperty Type")]
34 [Property("SPEC", "Tizen.NUI.ScriptableProperty.Type A")]
35 [Property("SPEC_URL", "-")]
36 [Property("CRITERIA", "PRO")]
37 [Property("AUTHOR", "guowei.wang@samsung.com")]
38 public void ScriptablePropertyType()
40 tlog.Debug(tag, $"ScriptablePropertyType START");
42 var testingTarget = new ScriptableProperty();
43 Assert.IsNotNull(testingTarget, "should be not null");
44 Assert.IsInstanceOf<ScriptableProperty>(testingTarget, "should be an instance of testing target class!");
46 var result = testingTarget.Type;
47 tlog.Debug(tag, "Type : " + result);
49 tlog.Debug(tag, $"ScriptablePropertyType END (OK)");
54 [Description("CustomViewRegistry Register")]
55 [Property("SPEC", "Tizen.NUI.CustomViewRegistry.Register M")]
56 [Property("SPEC_URL", "-")]
57 [Property("CRITERIA", "MR")]
58 [Property("AUTHOR", "guowei.wang@samsung.com")]
59 public void CustomViewRegistryRegisterNullViewType()
61 tlog.Debug(tag, $"CustomViewRegistryRegisterNullViewType START");
65 CustomViewRegistry.Instance.Register(CreateInstance, null);
67 catch (ArgumentNullException e)
69 tlog.Debug(tag, e.Message.ToString());
70 tlog.Debug(tag, $"CustomViewRegistryRegisterNullViewType END (OK)");
71 Assert.Pass("Caught ArgumentNullException : Passed!");