3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Collections.Generic;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("public/Utility/GraphicsTypeManager")]
14 public class PublicGraphicsTypeManagerTest
16 private const string tag = "NUITEST";
18 internal class MyTypeConverter : Tizen.NUI.Binding.TypeConverter
20 public MyTypeConverter() : base()
27 tlog.Info(tag, "Init() is called!");
33 tlog.Info(tag, "Destroy() is called!");
38 [Description("GraphicsTypeManager ConvertScriptToPixel.")]
39 [Property("SPEC", "Tizen.NUI.GraphicsTypeManager.ConvertScriptToPixel M")]
40 [Property("SPEC_URL", "-")]
41 [Property("CRITERIA", "MR")]
42 [Property("AUTHOR", "guowei.wang@samsung.com")]
43 public void GraphicsTypeManagerConvertScriptToPixel()
45 tlog.Debug(tag, $"GraphicsTypeManagerConvertScriptToPixel START");
49 GraphicsTypeManager.Instance.ConvertScriptToPixel("160px");
53 tlog.Debug(tag, e.Message.ToString());
54 Assert.Fail("Caught Exception: Failed!");
57 tlog.Debug(tag, $"GraphicsTypeManagerConvertScriptToPixel END (OK)");
62 [Description("GraphicsTypeManager RegisterCustomConverterForDynamicResourceBinding.")]
63 [Property("SPEC", "Tizen.NUI.GraphicsTypeManager.RegisterCustomConverterForDynamicResourceBinding M")]
64 [Property("SPEC_URL", "-")]
65 [Property("CRITERIA", "MR")]
66 [Property("AUTHOR", "guowei.wang@samsung.com")]
67 public void GraphicsTypeManagerRegisterCustomConverterForDynamicResourceBinding()
69 tlog.Debug(tag, $"GraphicsTypeManagerRegisterCustomConverterForDynamicResourceBinding START");
71 string str = "GraphicsTypeManager";
72 Tizen.NUI.Binding.TypeConverter converter = new MyTypeConverter();
76 GraphicsTypeManager.Instance.RegisterCustomConverterForDynamicResourceBinding(str.GetType(), converter);
80 tlog.Debug(tag, e.Message.ToString());
81 Assert.Fail("Caught Exception: Failed!");
84 tlog.Debug(tag, $"GraphicsTypeManagerRegisterCustomConverterForDynamicResourceBinding END (OK)");