1 using NUnit.Framework;
4 namespace Tizen.NUI.Devel.Tests
6 using tlog = Tizen.Log;
9 [Description("public/xaml/ViewExtensions")]
11 public class PublicViewExtensionsTest
13 private const string tag = "NUITEST";
14 private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
19 tlog.Info(tag, "Init() is called!");
25 tlog.Info(tag, "Destroy() is called!");
30 [Description("Extensions LoadFromXaml")]
31 [Property("SPEC", "Tizen.NUI.Extensions.LoadFromXaml M")]
32 [Property("SPEC_URL", "-")]
33 [Property("CRITERIA", "MR")]
34 [Property("COVPARAM", "string,Type")]
35 public void ExtensionsLoadFromXaml1()
37 tlog.Debug(tag, $"ExtensionsLoadFromXaml START");
40 Tizen.NUI.Xaml.Extensions.LoadFromXaml<string>("mystring", typeof(string));
44 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
45 Assert.Fail("Caught Exception" + e.ToString());
47 tlog.Debug(tag, $"ExtensionsLoadFromXaml END (OK)");
48 Assert.Pass("ExtensionsLoadFromXaml");
53 [Description("Extensions LoadFromXaml")]
54 [Property("SPEC", "Tizen.NUI.Extensions.LoadFromXaml M")]
55 [Property("SPEC_URL", "-")]
56 [Property("CRITERIA", "MR")]
57 [Property("COVPARAM", "string,string")]
58 public void ExtensionsLoadFromXaml2()
60 tlog.Debug(tag, $"ExtensionsLoadFromXaml START");
63 Tizen.NUI.Xaml.Extensions.LoadFromXaml<string>("mystring", "/home/owner/apps_rw/Tizen.NUI.Devel.Tests/tizen-manifest.xml");
67 tlog.Debug(tag, e.Message.ToString());
68 tlog.Debug(tag, $"ExtensionsLoadFromXaml END (OK)");
69 Assert.Pass("Caught Exception : passed!");
75 [Description("Extensions LoadObject")]
76 [Property("SPEC", "Tizen.NUI.Extensions.LoadObject M")]
77 [Property("SPEC_URL", "-")]
78 [Property("CRITERIA", "MR")]
79 public void ExtensionsLoadObject()
81 tlog.Debug(tag, $"ExtensionsLoadObject START");
85 Tizen.NUI.Xaml.Extensions.LoadObject<string>(path);
90 tlog.Debug(tag, e.Message.ToString());
91 tlog.Debug(tag, $"ExtensionsLoadObject END (OK)");
92 Assert.Pass("Caught Exception : passed!");
98 [Description("Extensions LoadFromXamlFile")]
99 [Property("SPEC", "Tizen.NUI.Extensions.LoadFromXamlFile M")]
100 [Property("SPEC_URL", "-")]
101 [Property("CRITERIA", "MR")]
102 public void ExtensionsLoadFromXamlFile()
104 tlog.Debug(tag, $"ExtensionsLoadFromXamlFile START");
107 Tizen.NUI.Xaml.Extensions.LoadFromXamlFile<string>("myview", "/home/owner/apps_rw/Tizen.NUI.Devel.Tests/tizen-manifest.xml");
112 tlog.Debug(tag, e.Message.ToString());
113 tlog.Debug(tag, $"ExtensionsLoadFromXamlFile END (OK)");
114 Assert.Pass("Caught Exception : passed!");