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 static XamlResourceIdAttribute resourceIdAttribute;
17 internal class AssemblyImplent : Assembly
19 public override object[] GetCustomAttributes(bool inherit)
28 tlog.Info(tag, "Init() is called!");
29 resourceIdAttribute = new XamlResourceIdAttribute("myId", "myPath", typeof(string));
35 resourceIdAttribute = null;
36 tlog.Info(tag, "Destroy() is called!");
41 [Description("XamlResourceIdAttribute XamlResourceIdAttribute")]
42 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.XamlResourceIdAttribute C")]
43 [Property("SPEC_URL", "-")]
44 [Property("CRITERIA", "CONSTR")]
45 public void XamlResourceIdAttributeConstructor()
47 tlog.Debug(tag, $"XamlResourceIdAttributeConstructor START");
49 XamlResourceIdAttribute x1 = new XamlResourceIdAttribute("myId", "myPath", typeof(string));
51 tlog.Debug(tag, $"XamlResourceIdAttributeConstructor END (OK)");
52 Assert.Pass("XamlResourceIdAttributeConstructor");
57 [Description("XamlResourceIdAttribute ResourceId")]
58 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.ResourceId A")]
59 [Property("SPEC_URL", "-")]
60 [Property("CRITERIA", "PRW")]
61 public void XamlResourceIdAttributeResourceId()
63 tlog.Debug(tag, $"XamlResourceIdAttributeResourceId START");
67 string s1 = resourceIdAttribute.ResourceId;
68 resourceIdAttribute.ResourceId = s1;
72 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
73 Assert.Fail("Caught Exception" + e.ToString());
76 tlog.Debug(tag, $"XamlResourceIdAttributeResourceId END (OK)");
77 Assert.Pass("XamlResourceIdAttributeResourceId");
82 [Description("XamlResourceIdAttribute Path")]
83 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.Path A")]
84 [Property("SPEC_URL", "-")]
85 [Property("CRITERIA", "PRW")]
86 public void XamlResourceIdAttributePath()
88 tlog.Debug(tag, $"XamlResourceIdAttributePath START");
92 string s1 = resourceIdAttribute.Path;
93 resourceIdAttribute.Path = s1;
97 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
98 Assert.Fail("Caught Exception" + e.ToString());
101 tlog.Debug(tag, $"XamlResourceIdAttributePath END (OK)");
102 Assert.Pass("XamlResourceIdAttributePath");
107 [Description("XamlResourceIdAttribute Type")]
108 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.Type A")]
109 [Property("SPEC_URL", "-")]
110 [Property("CRITERIA", "PRW")]
111 public void XamlResourceIdAttributeType()
113 tlog.Debug(tag, $"XamlResourceIdAttributeType START");
117 Type t1 = resourceIdAttribute.Type;
118 resourceIdAttribute.Type = t1;
122 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
123 Assert.Fail("Caught Exception" + e.ToString());
126 tlog.Debug(tag, $"XamlResourceIdAttributeType END (OK)");
127 Assert.Pass("XamlResourceIdAttributeType");
132 [Description("XamlResourceIdAttribute GetResourceIdForType")]
133 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetResourceIdForType M")]
134 [Property("SPEC_URL", "-")]
135 [Property("CRITERIA", "MR")]
136 public void XamlResourceIdAttributeGetResourceIdForType()
138 tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForType START");
142 XamlResourceIdAttribute.GetResourceIdForType(typeof(string));
146 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
147 Assert.Fail("Caught Exception" + e.ToString());
150 tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForType END (OK)");
151 Assert.Pass("XamlResourceIdAttributeGetResourceIdForType");
156 [Description("XamlResourceIdAttribute GetPathForType")]
157 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetPathForType M")]
158 [Property("SPEC_URL", "-")]
159 [Property("CRITERIA", "MR")]
160 public void XamlResourceIdAttributeGetPathForType()
162 tlog.Debug(tag, $"XamlResourceIdAttributeGetPathForType START");
166 XamlResourceIdAttribute.GetPathForType(typeof(string));
170 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
171 Assert.Fail("Caught Exception" + e.ToString());
174 tlog.Debug(tag, $"XamlResourceIdAttributeGetPathForType END (OK)");
175 Assert.Pass("XamlResourceIdAttributeGetPathForType");
180 [Description("XamlResourceIdAttribute GetTypeForResourceId")]
181 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetTypeForResourceId M")]
182 [Property("SPEC_URL", "-")]
183 [Property("CRITERIA", "MR")]
184 public void XamlResourceIdAttributeGetTypeForResourceId()
186 tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForResourceId START");
190 AssemblyImplent assembly = new AssemblyImplent();
191 XamlResourceIdAttribute.GetTypeForResourceId(assembly, "myResourceId");
195 tlog.Debug(tag, e.Message.ToString());
196 tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForResourceId END (OK)");
197 Assert.Pass("Caught Exception : passed!");
203 [Description("XamlResourceIdAttribute GetResourceIdForPath")]
204 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetResourceIdForPath M")]
205 [Property("SPEC_URL", "-")]
206 [Property("CRITERIA", "MR")]
207 public void XamlResourceIdAttributeGetResourceIdForPath()
209 tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForPath START");
213 AssemblyImplent assembly = new AssemblyImplent();
214 XamlResourceIdAttribute.GetResourceIdForPath(assembly, "myPath");
218 tlog.Debug(tag, e.Message.ToString());
219 tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForPath END (OK)");
220 Assert.Pass("Caught Exception : passed!");
226 [Description("XamlResourceIdAttribute GetTypeForPath")]
227 [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetTypeForPath M")]
228 [Property("SPEC_URL", "-")]
229 [Property("CRITERIA", "MR")]
230 public void XamlResourceIdAttributeGetTypeForPath()
232 tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForPath START");
236 AssemblyImplent assembly = new AssemblyImplent();
237 XamlResourceIdAttribute.GetTypeForPath(assembly, "myPath");
241 tlog.Debug(tag, e.Message.ToString());
242 tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForPath END (OK)");
243 Assert.Pass("Caught Exception : passed!");