1 using NUnit.Framework;
3 using System.Reflection;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("public/xaml/XamlResourceIdAttribute ")]
12 public class PublicXamlResourceIdAttributeTest
14 private const string tag = "NUITEST";
15 private XamlResourceIdAttribute resourceId;
19 tlog.Info(tag, "Init() is called!");
20 resourceId = new XamlResourceIdAttribute("myId", "myPath", typeof(string));
27 tlog.Info(tag, "Destroy() is called!");
32 [Description("XamlResourceIdAttribute ResourceId")]
33 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.ResourceId A")]
34 [Property("SPEC_URL", "-")]
35 [Property("CRITERIA", "PRW")]
36 public void XamlResourceIdAttributeResourceId()
38 tlog.Debug(tag, $"XamlResourceIdAttributeResourceId START");
42 var id = resourceId.ResourceId;
43 resourceId.ResourceId = id;
44 Assert.AreEqual(id, resourceId.ResourceId, "Should be equal");
48 tlog.Debug(tag, e.Message.ToString());
49 Assert.Fail("Caught Exception : Failed!");
52 tlog.Debug(tag, $"XamlResourceIdAttributeResourceId END");
57 [Description("XamlResourceIdAttribute Path")]
58 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.Path A")]
59 [Property("SPEC_URL", "-")]
60 [Property("CRITERIA", "PRW")]
61 public void XamlResourceIdAttributePath()
63 tlog.Debug(tag, $"XamlResourceIdAttributePath START");
67 var path = resourceId.Path;
68 resourceId.Path = path;
69 Assert.AreEqual(path, resourceId.Path, "Should be equal");
73 tlog.Debug(tag, e.Message.ToString());
74 Assert.Fail("Caught Exception : Failed!");
77 tlog.Debug(tag, $"XamlResourceIdAttributePath END");
82 [Description("XamlResourceIdAttribute Type")]
83 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.Type A")]
84 [Property("SPEC_URL", "-")]
85 [Property("CRITERIA", "PRW")]
86 public void XamlResourceIdAttributeType()
88 tlog.Debug(tag, $"XamlResourceIdAttributeType START");
92 var type = resourceId.Type;
93 resourceId.Type = type;
94 Assert.AreEqual(type, resourceId.Type, "Should be equal");
98 tlog.Debug(tag, e.Message.ToString());
99 Assert.Fail("Caught Exception : Failed!");
102 tlog.Debug(tag, $"XamlResourceIdAttributeType END");
103 Assert.Pass("XamlResourceIdAttributeType");
108 [Description("XamlResourceIdAttribute GetResourceIdForType")]
109 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetResourceIdForType M")]
110 [Property("SPEC_URL", "-")]
111 [Property("CRITERIA", "MR")]
112 public void XamlResourceIdAttributeGetResourceIdForType()
114 tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForType START");
118 XamlResourceIdAttribute.GetResourceIdForType(typeof(string));
122 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
123 Assert.Fail("Caught Exception" + e.ToString());
126 tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForType END");
131 [Description("XamlResourceIdAttribute GetPathForType")]
132 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetPathForType M")]
133 [Property("SPEC_URL", "-")]
134 [Property("CRITERIA", "MR")]
135 public void XamlResourceIdAttributeGetPathForType()
137 tlog.Debug(tag, $"XamlResourceIdAttributeGetPathForType START");
141 XamlResourceIdAttribute.GetPathForType(typeof(string));
145 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
146 Assert.Fail("Caught Exception" + e.ToString());
149 tlog.Debug(tag, $"XamlResourceIdAttributeGetPathForType END");